// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#include "quantized_datatypes.h"
#include "quantized_face_detection_fast.h"

#define MEM_BUF_SIZE 165840
#define INPUT_IMG_HEIGHT 240
#define INPUT_IMG_WIDTH 320
#define OUTPUT_SIZE 5400

// Fixed Point Output Corresponding To SCUT-HEAD Face-3 Image: 1
#ifdef SHIFT
  const Q15_T expected[OUTPUT_SIZE] = {4342, -10192, 5213, -12644, 5743, -13002, 5905, -13192, 6762, -14236, 6110, -13126, 5836, -13335, 7149, -12284, 9237, -12187, 9366, -11929, 9579, -11970, 7131, -10987, 6109, -9656, 4022, -6486, 4700, -8724, 5036, -10398, 4763, -10886, 5254, -11838, 5412, -12179, 6196, -11460, 5855, -13782, 8740, -19717, 10650, -20426, 11299, -21209, 11613, -21298, 10417, -19597, 8037, -18872, 6353, -15879, 5173, -10273, 4433, -8743, 5649, -10470, 8549, -16291, 5660, -11990, 5660, -14176, 5742, -14300, 6207, -10109, 8213, -15968, 6858, -12241, 7260, -17230, 7826, -12888, 4895, -14389, 6622, -20032, 8038, -19871, 7740, -19608, 9004, -20086, 9184, -17952, 6354, -17683, 7617, -15753, 6281, -11658, 2956, -11012, 3485, -11318, 9806, -16585, 3498, -8508, 6073, -13236, 6309, -6244, 5258, -12798, 4854, -10641, 6360, -12687, 5170, -10501, 5676, -9496, 5005, -14007, 6918, -17418, 7870, -18403, 8463, -18776, 8906, -18017, 8926, -17808, 7617, -16752, 6146, -13717, 4752, -10970, 6168, -15099, 5606, -12731, 5935, -15522, 5695, -12754, 5258, -15133, 6053, -11546, 6481, -15904, 8486, -11269, 6944, -14077, 5800, -14187, 4956, -12543, 3728, -11007, 7232, -13404, 7541, -16001, 9675, -16968, 5447, -8461, 7253, -17368, 6494, -16915, 4546, -12149, 4181, -12165, 4715, -16332, 5774, -14640, 4472, -12143, 4434, -8447, 5623, -18268, 5904, -9961, 6064, -13164, 5533, -15605, 5797, -11604, 5918, -15242, 6535, -16134, 4014, -9313, 4395, -14448, 7334, -16976, 8544, -16801, 7390, -10855, 5788, -14852, 6743, -15375, 5044, -13700, 5823, -12299, 5207, -11591, 6022, -8459, 5323, -11737, 7520, -17697, 5840, -15919, 5815, -7313, 5208, -13102, 7891, -15509, 7714, -15806, 5496, -16536, 4950, -14524, 7474, -12849, 8809, -18792, 8884, -11989, 6412, -7698, 6425, -11924, 6162, -12817, 5812, -9761, 4059, -7351, 1444, -6589, 5047, -10021, 3261, -6010, 7117, -9415, 5864, -14861, 5153, -9417, 4925, -8199, 7919, -11283, 8234, -15376, 5754, -13438, 6239, -6002, 5427, -7897, 5363, -12084, 5944, -13921, 4565, -9924, 5321, -13738, 6147, -13139, 7294, -16034, 6990, -9994, 5000, -9035, 5929, -12160, 4089, -11035, 5927, -13075, 5093, -13227, 6510, -11255, 7479, -12171, 7020, -6647, 8262, -13180, 7642, -7911, 5543, -7781, 3275, -9750, 2061, -4078, 6094, -10107, 7307, -11446, 4922, -6815, 4835, -8927, 5441, -8329, 6903, -13108, 9340, -15837, 8099, -10226, 6685, -8211, 6199, -12101, 5352, -10384, 6489, -12990, 5659, -11916, 7371, -17031, 5170, -5756, 5304, -12813, 4373, -7236, 5755, -7270, 2952, -8410, 4187, -9690, 5426, -9920, 5372, -14006, 5470, -11803, 4541, -7336, 4905, -7616, 7615, -12173, 7484, -11558, 6609, -9835, 6714, -12844, 6485, -14607, 7930, -17358, 8872, -15773, 8423, -12525, 8730, -11822, 7583, -10801, 8102, -15731, 4715, -6962, 5881, -10989, 6798, -11035, 6035, -14804, 5747, -9839, 7718, -12209, 7282, -13055, 5919, -11956, 5940, -11128, 5037, -12305, 5923, -12553, 6395, -13381, 5220, -11251, 6906, -13174, 8037, -16205, 8297, -13450, 7488, -9415, 6998, -14073, 6785, -9790, 6589, -10638, 7711, -12951, 7482, -15079, 8410, -13423, 6409, -12290, 5111, -7831, 4962, -7846, 8629, -11097, 6340, -10740, 7027, -16031, 8057, -14412, 8109, -13874, 7275, -16218, 7498, -11868, 5228, -12202, 7854, -9218, 7458, -9813, 7045, -9582, 6811, -10570, 6246, -11563, 7124, -9564, 7650, -16226, 8508, -15020, 5774, -13040, 4599, -8956, 4387, -10036, 4429, -8798, 5742, -9526, 8378, -10282, 8744, -15812, 9928, -15309, 7981, -14057, 9479, -14379, 8185, -13675, 6656, -7916, 7492, -9924, 7174, -16537, 7962, -14741, 8886, -14655, 9674, -15611, 7642, -14099, 8639, -11783, 7935, -15491, 8416, -11336, 5396, -7791, 6873, -11081, 9071, -10576, 8492, -13717, 11766, -15355, 10520, -14203, 13056, -17364, 11168, -13925, 12703, -13408, 10909, -11707, 9828, -16272, 9513, -13143, 8516, -10527, 9045, -13731, 9360, -13683, 10322, -15866, 12767, -17548, 11067, -14616, 10076, -14455, 7264, -8081, 5363, -10509, 6510, -10545, 8294, -13169, 7916, -13228, 9649, -15343, 9280, -13042, 10150, -15096, 10032, -13549, 10077, -14807, 9005, -13418, 8429, -14349, 8068, -12803, 7575, -10553, 8672, -13230, 9446, -13495, 9774, -13769, 8991, -14085, 8829, -11506, 8256, -12766, 6551, -11248, 4966, -8272, 9016, -8125, 10299, -9721, 10462, -9464, 10433, -9788, 10298, -9533, 9554, -8865, 9797, -9126, 10514, -10122, 11247, -10815, 10688, -10657, 10014, -9490, 9639, -9412, 8700, -8032, 7929, -7428, 9859, -9128, 10026, -8945, 10635, -9873, 10390, -9786, 8620, -8246, 7819, -7064, 10995, -10009, 12473, -11536, 11161, -10019, 11097, -10218, 10696, -9967, 10597, -9967, 10177, -9468, 10293, -9866, 8681, -8185, 7546, -7156, 8283, -8163, 10209, -9796, 10093, -9243, 8263, -7837, 8624, -7558, 9228, -8504, 9338, -8106, 10735, -9937, 11844, -10934, 8873, -8288, 10646, -9841, 12080, -11130, 10262, -9443, 10086, -9543, 10350, -9412, 9041, -8751, 9064, -8945, 9387, -8974, 9704, -9003, 7437, -7039, 7927, -7430, 9659, -8909, 6832, -5990, 9132, -8648, 6706, -5799, 8985, -7857, 7205, -6429, 8875, -8063, 9202, -8320, 8748, -8073, 10187, -8966, 11244, -10223, 10353, -9246, 9894, -9261, 8256, -7238, 8873, -8459, 11339, -10587, 9431, -8607, 10269, -9552, 9537, -9184, 9693, -8529, 8704, -7800, 7742, -7224, 9009, -8473, 9096, -8395, 10112, -8974, 7777, -6862, 9433, -8520, 11135, -10492, 9954, -9133, 9577, -8441, 10077, -9493, 9613, -8803, 7225, -6408, 4774, -3928, 10142, -9601, 10684, -9937, 8644, -8020, 8252, -7254, 10522, -10144, 10424, -9617, 7526, -6534, 8233, -8219, 10853, -9778, 9316, -8048, 10509, -9802, 9993, -8987, 10505, -9564, 11845, -11147, 11551, -10870, 7853, -7020, 9262, -9001, 10017, -9199, 7869, -7097, 6342, -5936, 8373, -7963, 9024, -8812, 8473, -7591, 7294, -6594, 8639, -8317, 7685, -6498, 7943, -7685, 9714, -9169, 10537, -9111, 7999, -6999, 9706, -9061, 11238, -10062, 11451, -10424, 11680, -11441, 11926, -11508, 8493, -8033, 10373, -9966, 8818, -8329, 6924, -6173, 8346, -7672, 8542, -7533, 6052, -5497, 6078, -5803, 7847, -7311, 9041, -8700, 7575, -6424, 8383, -8221, 11662, -10881, 9338, -8374, 8959, -7936, 10256, -9858, 9680, -9426, 8717, -7552, 5962, -5258, 5945, -5147, 8666, -7935, 10325, -9649, 9134, -8281, 9570, -9102, 9021, -8683, 8776, -7923, 6158, -5577, 6270, -6055, 7125, -6786, 8255, -8167, 8615, -7963, 9444, -8790, 8746, -7738, 9459, -8497, 7544, -6412, 9159, -9116, 5791, -4690, 5753, -5125, 6218, -5668, 4753, -4325, 9460, -8894, 7848, -7072, 8236, -7274, 8090, -7174, 9799, -9103, 11024, -10386, 9667, -8923, 5697, -5245, 3761, -3688, 7447, -6848, 8093, -7369, 10674, -9857, 8624, -7825, 9463, -8715, 5968, -4864, 7439, -6950, 5248, -3790, 4704, -3768, 6722, -5534, 8393, -7583, 9824, -9379, 9072, -8312, 8260, -7326, 7297, -6839, 7960, -7544, 9602, -8377, 9400, -8365, 7680, -6997, 6108, -5135, 9653, -8816, 10832, -10596, 9620, -8605, 8286, -7222, 7863, -7484, 8635, -7406, 9107, -8530, 6581, -5359, 4843, -4388, 7850, -6616, 10720, -9663, 8057, -7457, 7579, -6627, 8295, -7760, 8528, -7756, 9520, -8618, 9333, -8004, 10347, -9239, 9296, -8354, 8410, -7359, 9243, -8738, 10950, -10014, 9445, -8900, 8356, -7373, 10573, -9903, 8889, -7560, 9783, -9110, 9691, -8641, 9569, -9200, 9751, -8639, 10347, -9193, 6845, -6612, 6337, -5804, 7558, -6949, 8806, -8638, 12093, -11218, 10947, -9906, 10558, -9865, 10934, -10015, 9528, -8463, 9911, -9029, 9040, -8024, 8016, -7940, 7967, -7200, 10067, -9406, 8821, -7704, 8786, -8120, 10302, -9121, 10438, -9986, 10982, -9757, 8773, -7761, 8376, -7893, 8397, -7874, 6776, -5940, 9485, -9207, 11942, -10673, 12141, -11653, 11654, -10967, 11977, -10889, 10707, -10002, 9962, -9120, 10069, -8694, 11268, -10542, 10692, -9679, 10388, -9679, 10508, -9366, 10445, -9835, 9966, -9057, 10975, -10497, 7884, -7056, 7394, -6640, 11112, -10348, 10557, -10210, 9553, -8534, 10128, -9760, 11595, -10223, 11330, -10700, 11518, -11000, 9531, -8840, 10122, -9798, 11981, -11193, 10988, -9987, 11380, -10615, 12051, -11111, 10976, -10498, 11272, -10200, 11753, -10835, 11355, -10601, 10389, -9619, 8676, -8190, 10086, -9137, 10708, -10467, 12356, -12410, 12146, -12009, 12330, -12410, 12903, -12781, 12153, -12120, 12194, -12517, 8563, -8431, 9275, -9435, 13004, -12726, 13112, -12874, 11521, -11665, 11663, -11543, 12788, -13227, 12505, -12316, 12356, -12423, 12007, -11730, 12003, -11873, 11319, -11300, 9990, -9834, 11203, -11441, 11805, -12202, 10618, -11097, 10770, -11465, 10687, -11133, 10781, -11201, 10774, -11186, 11744, -12410, 12580, -13101, 11794, -12307, 11207, -11782, 11725, -12240, 11061, -11126, 9810, -10273, 9872, -10134, 9950, -10517, 10847, -11129, 11207, -11685, 10448, -10836, 9767, -9947, 13479, -13426, 14000, -13614, 11058, -10649, 10418, -10369, 11917, -11670, 11179, -11002, 11562, -11521, 13422, -12850, 12404, -12407, 11466, -11714, 11849, -12029, 13061, -13102, 11381, -11403, 11203, -11121, 11961, -11943, 11684, -11633, 11439, -11383, 12867, -13340, 11934, -11690, 11112, -11053, 13200, -12919, 12905, -12236, 9594, -9287, 9884, -9713, 11869, -11587, 11810, -11731, 12748, -12779, 12501, -11906, 11622, -11339, 11038, -10791, 11188, -10822, 11655, -11138, 9844, -9731, 11283, -10717, 12343, -11841, 11519, -11673, 12051, -11517, 12639, -12064, 12383, -11784, 12196, -11787, 13641, -13264, 11823, -11229, 9355, -9165, 10364, -10224, 9500, -9365, 11307, -11137, 13213, -12907, 12854, -12597, 10561, -10716, 10092, -9931, 10179, -9213, 9222, -9028, 9450, -9007, 10904, -10630, 11884, -10928, 11485, -11249, 10640, -9928, 10906, -10369, 11085, -10623, 11514, -10961, 12279, -12275, 10411, -10571, 9008, -8878, 8408, -8048, 7606, -7694, 9490, -9538, 12468, -12160, 11586, -11548, 8768, -9002, 8705, -8658, 8200, -7702, 8803, -8794, 8996, -8938, 10992, -10469, 10766, -10541, 10811, -10769, 9176, -8907, 8971, -8142, 9672, -9271, 10557, -10414, 10359, -10613, 9401, -9408, 8765, -8412, 8641, -8612, 8641, -8753, 9714, -10072, 12236, -11874, 11199, -10771, 9181, -9246, 8030, -7910, 7698, -7501, 8109, -8052, 9228, -9086, 10520, -9727, 8889, -8818, 8444, -8225, 8583, -8445, 8307, -8687, 9668, -9858, 10805, -10711, 9402, -9509, 9374, -9202, 9173, -8748, 8743, -8657, 8869, -9151, 10317, -10453, 9186, -9015, 9179, -9403, 8860, -9322, 8940, -8604, 7609, -7404, 8767, -8915, 10235, -10127, 8585, -8691, 7543, -7415, 6399, -6727, 7988, -7822, 9195, -9331, 9599, -9973, 9177, -9327, 9424, -9323, 9298, -9244, 7895, -7865, 7765, -7201, 8065, -8112, 9597, -9296, 7905, -8179, 7577, -7770, 6782, -6865, 7630, -8008, 7547, -7471, 8861, -8731, 9429, -9481, 8458, -8565, 5614, -5856, 5391, -5924, 6186, -7010, 8127, -8399, 10057, -10310, 10377, -10371, 10044, -9786, 9442, -9062, 8205, -8340, 7821, -7614, 7426, -7653, 9539, -9680, 8649, -8627, 6121, -6100, 4927, -4782, 7299, -7369, 8519, -8522, 8634, -8541, 8309, -8186, 7853, -7626, 4867, -4763, 5674, -5790, 5371, -5420, 5753, -5739, 7229, -7318, 10744, -10855, 9789, -9728, 9131, -9311, 9608, -9497, 9513, -9432, 9146, -9159, 10163, -10049, 11728, -11239, 9473, -9400, 8408, -7744, 8827, -8958, 9238, -9051, 8688, -8224, 7520, -7405, 8924, -8704, 7629, -7487, 7904, -7800, 5907, -5719, 3656, -3291, 6437, -6283, 9563, -9379, 9298, -9174, 8888, -9018, 9605, -9784, 9475, -9503, 11045, -10921, 11419, -11196, 12099, -11561, 11025, -11008, 9501, -8887, 10118, -10113, 9481, -9265, 9664, -9295, 9469, -9624, 10142, -9643, 10016, -9575, 11620, -11113, 9610, -9532, 6658, -6505, 8059, -7447, 9396, -9261, 9094, -8925, 9138, -9178, 10606, -10390, 10568, -10561, 11769, -11727, 11738, -11912, 11857, -11618, 11320, -11108, 10240, -10301, 11305, -10955, 10467, -10404, 11578, -10824, 10675, -10244, 11185, -10992, 11733, -11359, 12302, -11943, 10193, -10051, 7935, -7898, 7668, -7284, 9120, -9236, 10174, -10119, 9718, -9320, 10104, -9998, 10963, -10667, 11128, -10967, 12250, -12142, 10517, -10589, 10577, -10314, 10648, -10834, 13144, -12476, 11039, -10852, 11970, -11714, 11724, -11390, 11472, -11147, 12276, -11797, 11610, -11351, 11181, -11147, 10149, -10075, 9046, -8956, 9714, -9761, 12787, -12527, 12311, -11621, 9866, -9263, 11044, -10229, 11117, -10544, 11882, -11442, 11385, -10773, 11295, -10720, 12375, -12003, 13753, -13527, 12144, -11762, 11923, -11536, 12516, -12453, 11386, -10912, 11072, -10351, 10685, -10437, 11416, -10855, 11451, -10825, 11832, -11395, 11993, -11434, 11040, -11046, 11751, -11400, 9301, -9111, 9718, -9605, 10175, -9762, 9990, -9473, 9650, -9203, 9468, -9237, 10302, -9854, 11320, -10937, 11606, -11232, 11973, -11635, 11705, -11301, 11114, -10951, 10627, -10315, 10586, -10309, 10550, -10129, 10319, -10024, 10921, -10381, 10889, -10442, 1138, -208, -5598, -2581, 3334, 4534, -4000, -3479, 3895, 6323, -4540, -4135, 4482, 5782, -5032, -4655, 3785, 6204, -3783, -3715, 4313, 6253, -2911, -2786, 4541, 5746, -1964, -1420, 3840, 6706, -3968, -2333, 4124, 7082, -6320, -4381, 477, 6670, -5942, -4017, 563, 4117, -4656, -2542, -5, 6542, -1841, 318, 6213, 9489, -2955, -1533, 3406, 11511, -1214, 599, 579, 5609, -4827, -3608, 3363, 8813, -6177, -5219, 4922, 8079, -7373, -5534, 599, 6261, -3440, -2582, -590, 5813, -4143, -2511, 690, 7992, -7457, -4077, 1759, -52, -4748, -975, 314, -2702, -347, 554, 1609, -866, 1312, 3107, 4079, -799, 417, 2556, 5404, -1362, 3357, 5171, 3240, -2759, 3602, 5406, 4899, -2144, 2089, 3812, 2683, -4463, -105, 2829, 17034, 5501, -4536, -1821, 5466, 11403, -8294, -6415, 2068, 8821, -7243, -5828, -8353, 5267, -4798, -2117, -4817, 1938, -3875, -1604, 5779, -10260, -4324, -1263, 1834, 4967, -4985, -3325, -1386, -3029, -4554, -3046, -3186, -592, -5770, -3427, -5759, 79, -1559, 231, -1096, -127, -4623, -2160, -225, -4081, -7624, -2093, 1307, 2026, -5473, -1875, -3268, 1338, -1122, -20, -592, 1451, 878, 2403, -2324, 807, 1007, 2989, -161, 415, 519, 2781, 1779, 862, 1487, 3515, 637, -1053, 1062, 3350, 5037, 1263, 357, 3789, 12835, -5303, -3696, 45, 2309, -9402, -4709, -2459, -896, -8020, -3146, -774, 7007, -5684, -4236, -835, -8725, -7089, -2118, 1004, 2832, -3966, -3739, -990, 2146, -2841, 673, 2713, -5386, -2478, -2755, -988, -6169, -6418, -3309, -674, -6162, -3233, -2479, -58, -2993, -4991, -7456, -4929, -10591, -10226, -10834, -5741, -3502, 3571, -8247, -5043, 2053, 4415, -6674, -6382, -763, 7268, -3626, -2946, 191, 4644, -3485, -2327, -3057, 9962, -2470, -728, 1499, 3332, -837, 1497, 3303, 189, -604, 1062, 12580, 1730, -3977, -496, 1031, -2231, -6804, -3602, -5480, -4972, -4463, -2215, -1068, -7471, -4543, -1129, 12050, 5304, -1869, -1149, -676, -1365, -3856, -2210, 5935, 1689, -4592, -3570, -6191, 1004, -5895, -3602, -8763, 21, -3540, -2499, 9151, 2317, -1739, -408, -8513, 104, -5335, -3477, 8484, -11448, -8081, -6873, -8599, -3389, -8731, -5390, -3608, -424, -3909, -323, 7224, -3942, -807, -758, 1125, -8178, 94, 683, 9431, -1047, 2950, 3659, -8943, -3551, 3140, 5006, -3244, -3938, -900, 1561, 4324, -1657, -874, 462, 13643, -6624, -2070, 1379, 5552, -3013, -1451, 1879, -3141, 703, -1676, 457, 545, -5712, -4922, -2188, -10163, -5700, 2831, 4017, -3188, -12964, 374, 1395, 4491, -4605, -1642, -592, 209, -198, -4356, -2484, -6303, -656, -210, 836, 3595, -9014, -92, 1085, -616, -7707, -1778, -786, -8285, 243, -2609, -1851, -6248, 838, -6456, -3739, 1836, -5043, -2384, 1253, 1751, -3802, 2789, 3297, 4725, 1274, -273, 1190, -2880, 4304, 261, 1558, -3019, -9681, 1095, 2927, -10471, -4081, 309, 1974, 4515, 55, -348, 881, 5694, 4599, -713, 2053, 938, 6065, -1437, 572, 4840, 4342, -2162, -55, 12459, 10499, -655, 1266, -4893, 5784, 3257, 4386, 1786, 2847, 1611, 2708, -662, 2831, 1290, 2613, 7094, -3598, 1471, 3525, -7225, -130, 438, 1362, -1638, -268, -714, -646, 5467, 1005, -3279, -2523, 5857, -4288, -5003, -4252, -1979, -98, -8898, -6209, 175, -2254, -4037, -247, 7173, -1776, 2859, 3287, 6150, -968, 310, 2493, 6088, -14507, 2809, 4177, 1447, 712, 1250, 3119, -8124, 4569, 2311, 3095, 9331, 5969, 632, 2281, -6004, -4728, 1393, 3269, -4079, -5369, -621, 903, 980, -6188, -3557, -2199, 7439, -6735, -1146, 497, -5358, 2144, 3938, 4650, 4505, -1368, 1985, 2760, -4789, 2362, 2545, 3523, 2681, -1373, 1932, 3305, -7016, -5244, 2604, 3384, 1997, -935, -1981, -1903, 2187, 4681, -3916, -2738, 9338, 11324, -812, -547, -3139, 13172, -5195, -2470, 1474, 2380, -500, 4420, 1384, -2020, 4593, 5599, 384, -6390, 339, 2500, 3753, -5523, -945, 238, 4847, -12843, -1419, 163, 6500, -3291, -855, -286, 11230, -9215, 2156, 4111, -4239, -1226, 5036, 6119, -354, 4001, 3411, 4197, -6450, 25, 777, 2626, -3308, -3136, 3451, 4648, -7358, -2682, 6236, 7405, -2252, 11592, 7481, 7753, 4050, -4046, 3834, 5959, 2276, 1221, 5095, 7099, 2912, -1877, 2720, 4622, 6473, 8587, 248, 521, 5788, -4070, -4625, -3521, 252, -5902, -51, 965, -4778, -13105, -453, 2931, -7288, -4419, -2245, 2252, 3908, 7161, 4713, 4540, -8489, 4017, 2444, 3109, 10304, 4227, 1459, 2165, -2748, 2004, -1541, -95, -2188, -10058, -2611, -1355, 2841, -6099, -762, 1230, 8515, -5538, 6206, 7801, -8684, 7244, 8918, 9729, -2006, -907, 2986, 4820, -7314, -329, 7477, 7960, 3324, -8147, 2937, 3515, 199, -9827, 5200, 6658, 3541, -4617, 5461, 7056, 7868, -9666, 9637, 10830, -840, -7496, 2231, 3647, 712, -17117, 1304, 2728, 1558, -6747, 3243, 3741, -1717, -5677, 4778, 5351, -7227, -4485, 1488, 5176, -5768, -2757, -574, 2998, 4303, -12848, 1438, 2025, -291, -5591, 1572, 1994, 437, -11046, 3966, 4653, -6359, -10700, 2719, 4752, -8463, 3591, 2327, 3086, 13680, -247, 2551, 3997, -9415, -1724, 5149, 6611, 4095, -12232, 6807, 7983, -1820, -5573, 1129, 3020, 2038, -13945, 552, 1631, 1511, -1950, 1455, 2613, 3995, -2214, 1178, 2512, 983, 1750, 5065, 5752, -1587, -4599, 3559, 3884, 328, 1748, 1940, 3064, 3714, -8772, 8625, 9574, -3007, -10034, 9984, 11206, -2811, -6070, 6595, 7496, 1026, -6704, -1700, 1954, -4079, -1478, 354, 4113, 10828, 8417, 5923, 6059, 2934, 2324, 6874, 7101, -7405, 7986, 7705, 7590, 4256, -7557, 4212, 4960, -4926, -7274, 6825, 6688, -5239, -3402, 5976, 6245, -3629, -8116, 6002, 6666, 11273, -9118, 9259, 9282, -1004, -4822, 4803, 5750, -4994, 7587, 1284, 2467, 3339, -444, 2787, 4784, -1880, -8773, 2080, 4170, 3337, -5951, 2590, 3458, 1346, -6017, 7125, 7554, 7255, -3385, 5984, 7401, -3902, -9689, 6627, 7126, 388, -4825, 4331, 5000, 817, -5765, 2584, 2993, -3037, 1600, -4816, -2475, 3645, -4026, 1364, 5687, 2357, -9871, 7489, 9037, 5377, 4797, 7703, 8112, 1088, -4743, 6106, 7593, -746, -5333, 2287, 3792, 87, -4893, 6330, 6292, 10717, -26, 7302, 7516, 1299, -4878, 4043, 4366, 3445, 3656, 3817, 3229, 9023, 4068, 2243, 3003, 9234, -583, 5571, 6537, -2770, -10144, 6795, 8880, -8223, -2435, 6832, 8060, -4951, -1193, 6502, 7034, -2222, -6692, 6685, 7511, 5652, -10454, 7011, 8260, -9829, 1642, 5867, 6398, 3633, -22, 4225, 4896, 1991, 1953, 5961, 6653, 14, 4688, 912, 4360, 682, -5504, 1359, 5429, -8049, -3591, 6425, 7100, 4311, -8466, 7962, 9436, 1896, -8772, 7273, 8952, -8928, 945, 2310, 3860, -4372, -439, 3563, 4237, 10451, 2249, 2775, 3132, 3277, 3659, 4189, 4097, 3722, -4641, 2339, 2800, -2896, -9096, 5956, 6911, -8037, -12217, 7586, 8225, 3524, -7742, 3266, 5059, 2133, -12019, 5437, 6086, 1124, -11218, 5979, 6542, 6547, -7385, 6566, 7713, 7632, -1406, 6310, 7153, -7431, -355, 7344, 7545, 4910, -2180, 5776, 6096, 3128, -169, 7951, 7650, -1221, -3735, 5230, 9287, -3747, -2876, -1021, 2264, -4224, -2552, 4110, 4485, -3921, -2771, 4178, 5106, 1743, -3862, 6824, 8054, 1764, -9095, 3358, 4993, 5516, 3298, 5820, 6623, 6274, -7900, 4225, 5296, -1422, -3851, 8030, 8724, 631, -5126, 6881, 8257, -2333, -8135, 4526, 6743, -5841, -7915, 2741, 3417, 8491, -7262, 958, 2258, -9604, -3037, 4386, 5119, 1287, -4091, 5135, 6349, 1987, -3828, 3325, 4772, 1101, -7182, 5791, 6325, 955, -9603, 5442, 5775, 380, -6583, 4976, 4942, 586, -10746, 7107, 6886, -3396, -5229, 780, 4505, -6190, -1645, -4967, -590, -4571, -3745, -1117, 1431, -5815, -4107, -1829, 795, -4047, -5429, 298, 3115, -252, -2449, -1815, 783, -2240, -6102, 1579, 4472, -692, -6298, 2980, 5857, 6701, -1626, 5088, 8588, 707, -7221, 1267, 4615, -5869, -3138, -2847, 489, -3785, -4577, -3709, -983, -4297, -4538, -1262, 1633, -9007, -3872, -872, 1785, -3645, -4898, -1068, 1702, -2822, -5053, -597, 2524, 5294, -1692, -360, 2799, 8658, -4254, -1471, 985, 3095, -4077, -1819, 250, -3156, -6310, -2824, -820, -2380, -5910, -2151, 1906, 2032, -1626, -9500, -5423, -118, -1484, -7320, -6362, 1616, -1402, -6751, -5815, 1341, -1547, -6190, -5425, 1582, -808, -5984, -5071, 1107, -695, -5557, -4603, 944, -1178, -6144, -4117, -503, -571, -7245, -4248, 2261, 1360, -9585, -5803, 260, -64, -10779, -7927, 1388, 1663, -11117, -8354, 881, -372, -10351, -6555, 5778, 3591, -8544, -5300, -1636, 5077, -9981, -6652, 780, 4176, -9745, -7599, -1195, 3856, -9823, -8096, 2044, 2598, -10183, -7694, 229, 1131, -8442, -6347, -87, 907, -7114, -5369, -52, 1163, -8252, -4262, -1006, 252, -10672, -3474, 2377, 224, -6633, -4234, 3631, 3949, -5276, -2265, 2344, 3608, -4988, -1431, 3076, 3343, -4592, -430, 3028, 3015, -4549, 11, 2930, 3971, -4767, -4, 3317, 3624, -5628, -826, 8608, 5678, -10284, -5668, 1694, 6507, -10063, -7991, -12, 6791, -11861, -10297, -3828, 4062, -9647, -5216, 3017, 1193, -10461, -5126, 1452, -1319, -9514, -4836, -162, 6533, -8073, -4973, -2988, 1351, -10973, -8347, -800, 3465, -9560, -6863, -1747, 3274, -9280, -6234, 357, 1012, -7321, -5026, -1765, 513, -10078, -3462, -1308, -5, -11394, -4188, 843, -282, -6879, -3567, 1375, -1332, -6225, -1580, 1218, -871, -5437, -484, 1539, -911, -5487, 162, 2458, -1711, -5478, 783, 2849, -1767, -5143, 490, 4082, -1182, -7062, -1500, 3866, -3183, -10682, -5163, 1580, -960, -11349, -8231, -1267, -1611, -10694, -8926, 2777, -677, -9775, -6483, -2446, -385, -10078, -5570, 5848, -3969, -6978, -2270, 1728, -2522, -9566, -5756, 2006, -2708, -7895, -5288, -3514, -3786, -8627, -5903, 2760, -1424, -6684, -3055, -3461, -2618, -6216, -3583, -3560, -2253, -9697, -3408, -1384, 2003, -11223, -4407, -554, 189, -7605, -5560, -2042, -328, -5636, -2175, 433, 2031, -4259, -598, -2784, 3018, -4615, 510, 1399, 424, -2387, 3440, 1524, -1126, -3537, 1049, 3493, 2402, -6733, -2097, 698, 2981, -8611, -3412, -915, 119, -7933, -4770, -2137, -2121, -7322, -5183, 8002, 4012, -7351, -5710, -6562, -2944, -7044, -4522, 3039, -2768, -5819, -1798, -296, -5500, -7853, -4283, -1397, -3454, -6597, -4347, 3232, 608, -4548, -3208, -2919, -4786, -4296, -1480, -1517, -5670, -5006, -1832, -4248, -2072, -8815, -2963, 1802, 3173, -10174, -3837, -1837, 676, -4862, -4571, -1180, -1325, -3233, -1738, 5723, 405, -2081, 582, -5885, -2280, -4023, -336, 40, -1755, -673, 4035, 1557, -731, -1495, 2654, 5018, -3345, -5583, -470, 2899, -1737, -6465, -1989, -3399, 117, -6110, -2855, 2675, 302, -5068, -2672, 4618, -151, -5068, -2064, -7545, -4322, -3602, -1804, 1196, -1329, -4429, -1321, 1142, 1151, -5943, -3203, -2955, -1063, -4954, -2304, 3835, -5669, -1858, -228, -849, -3066, -4282, -1968, -1305, -562, -4479, -3174, -4332, 265, -7839, -3563, 2901, -2391, -9599, -2993, -1000, -1655, -3906, -2693, 1947, 1504, -4092, -2866, 4006, 4167, -4102, -1832, -5126, -3016, -3953, -830, -1109, -1405, -2563, 1611, 3294, -109, -2648, 890, -423, -218, -4354, -4, 4907, 682, -4701, -1212, -915, 602, -6288, -3428, 6491, 1310, -5652, -3098, -3250, -2546, -5037, -1685, -3323, -1614, -1418, 1316, 1153, -2608, -5043, -2714, 3467, -2238, -6224, -2756, -2302, -1512, -5197, -2923, -2069, -822, -2460, -1505, 799, 1715, -4796, -2667, -1829, 738, -8160, -5762, -4367, 1175, -10466, -5739, 3774, 1863, -7375, -1021, 2219, -2257, -2862, -1331, 5689, -1082, -4089, -1980, 343, -4260, -5660, -2693, -2725, -3629, -4469, -2404, 40, -223, -2728, -492, 7645, 2742, -2360, -374, -5454, 504, -3891, -797, 3011, -2234, -5791, -2714, -1375, -2233, -6601, -4774, 3554, -1215, -6388, -4681, -496, -2858, -4610, -2255, -466, -1748, -3914, -2175, 416, -999, -4582, -3037, 2483, -3784, -5949, -2430, -1109, -2433, -5209, -2470, -221, -688, -3745, -3792, 2897, 2705, -5234, -4262, 3167, 6501, -8117, -8661, -6976, 8291, -10918, -8347, 3192, -773, -8170, -1482, 1255, -1808, -4374, -2743, 1465, -4638, -5913, -3357, 1, -3334, -5507, -3494, -847, -4592, -4454, -3578, 47, -2359, -3044, -2764, 5767, -5278, -4288, -2439, -2955, -3332, -5365, -3227, -421, 1380, -4385, -1645, -502, -1044, -5945, -3694, -372, -1245, -5294, -3792, 1657, -1213, -3506, -2069, -2734, 3673, -5415, -4445, 1302, -1885, -5074, -3754, 3163, 4993, -4494, -1910, -1840, 2439, -4487, -3164, 5372, 7792, -3791, -6005, -2504, -1562, -5719, -6676, 4845, -4404, -5477, -6151, -4912, -4287, -9359, -7401, -3100, -3974, -8853, -2605, 4674, 1588, -5225, -4247, -2991, 1540, -5435, -3991, 5473, 3924, -6095, -4821, -1971, 938, -5249, -4746, -349, -4071, -4217, -3811, 28, -4202, -2867, -2051, 10760, 99, -2335, -678, -8158, 398, -3503, -1136, 1438, -2053, -4204, -1397, -3230, -1922, -4207, -2576, -638, -3138, -4594, -3725, -197, -5048, -4893, -2790, 1651, -3813, -3036, -1463, 6097, -4207, -3562, -972, -8383, -5011, -3007, -919, 6415, -4532, -3609, -4372, -1882, 4897, -2619, -3392, -3462, -101, -4705, -4749, -2587, -1557, -7103, -3421, -4498, -1813, -7810, -2299, 5295, -7674, -5234, -4128, -1949, -5450, -5302, -4776, 5285, -4460, -6956, -6426, -3532, -2615, -5173, -4112, 1678, 1546, -2320, -2588, 5038, -1433, -2176, -2891, 309, -5996, -2269, -1578, -2920, -9138, -2576, -497, -822, -6109, -4070, -1488, -3869, -5601, -3665, -1870, -256, -1180, -3658, -1527, 7864, 1446, -1310, 201, -458, -384, -1310, -110, 3615, -5100, 113, 1017, -2752, -4078, -1447, 183, 8389, -5649, -991, -478, -871, -7563, -3557, -3716, -6273, -4852, -3304, -3362, -4564, -2685, -7307, -2310, 3662, 5634, -4737, -473, 401, 6423, -1562, -2301, 6338, 729, -1800, -3394, -3996, 1367, -3360, -4470, 478, -5456, -4343, -4079, 197, -3417, -2993, -4423, 2852, -2608, -1198, -2601, -1907, -5154, -549, -1741, 3647, -4340, -1745, -1710, -5732, -2658, -2176, -1382, 3599, 1707, -1217, -201, -826, 986, -3489, -1692, 5021, -2259, -2814, -683, 646, -5082, -365, 57, 4105, -604, 932, 290, -3448, -460, -984, -727, 2460, -4461, -1668, -804, -1399, -7084, -1008, -713, 175, -4228, -783, -1112, -2426, 117, -6093, -2556, 9635, 355, -5730, -885, -3238, -3813, -3808, -3352, 6218, 3022, -1017, -2229, -8417, -1427, -2060, -3963, -606, -2122, -3988, -2770, 1360, -2915, -1884, -3152, 2264, -1949, -1493, -3014, -316, -2704, -1407, -2957, 2341, -774, -1445, -3658, -897, 300, -2842, -4059, 6036, -1406, -2443, -2019, -2631, -3569, -3367, -1320, -1509, -2921, -2729, -553, -963, -1551, -1431, -915, 3422, -5722, -430, -360, 314, -5303, -1948, -757, -820, -2599, -64, 818, 1259, -2026, 77, 107, 1072, -1459, -1180, -1635, -2888, 2650, -5877, -2096, 6507, -6000, -5714, -816, -3729, -6253, -1731, -1645, 5138, -5196, -910, -965, -4032, -4685, 464, -188, -1027, -289, -1917, -637, 544, -2662, 667, 14, 1285, -2864, 650, -2123, 3049, -1919, -83, -3234, 1136, -3417, -1104, -4086, 1470, -2690, -3592, -3724, -344, -3445, -2860, -2395, -1176, -6726, -1080, -376, 601, -6027, -1491, -1951, -595, -3759, -144, -860, 2252, -2849, 297, 316, 866, -3302, -1364, -1850, -435, -2669, -1304, -2119, 1685, -1964, -839, -1927, 1701, 1667, -1283, -2219, -3356, -149, -6766, -1488, 2222, -2013, -5473, -2299, -822, -2840, -295, -3047, 3837, -3407, 1763, -387, 1543, -3269, 2063, 61, -783, -3052, 294, -870, 3085, 709, 3062, 369, -1639, -1272, 2613, -652, 6100, 4985, 4320, 3031, -6567, 3398, 1902, 1165, 1132, -4896, -2237, -233, -3043, -5362, -2460, -1730, 1124, -3636, -1128, -1318, 3545, -1504, 1455, 973, -283, -2981, 1307, 644, 1428, -3140, -360, -544, 3554, -2649, -150, -1103, -215, -3690, -522, -2342, 3985, -2892, -395, -2562, -1694, -5170, -2406, -3714, -5912, -3037, -6986, -1978, -2071, -377, -5910, -2489, 2771, -1526, -1464, -3884, 25, -1666, 184, -2298, 2140, -2867, 299, -2066, -35, -2844, -111, -2050, 3702, -1667, 1667, -369, -2352, -2760, 1937, 147, 7705, -4199, 3232, 4073, -7523, -5800, 1757, 3749, -2801, -1041, -2342, -36, 2437, -1549, -3298, -2620, -1818, -1439, -3935, -3664, 1229, -2281, -1630, -532, 434, -3735, -1311, -413, 1787, -2598, -1512, -361, 2076, -3261, -1036, -467, 2783, -1404, -2055, -2490, -1961, -1811, -3288, -4569, -392, -124, -3654, -4706, -2486, 1857, -7977, -4674, 153, 4344, -5679, -4000, 2731, 6552, -5617, -6209, 991, 9183, -3794, -6354, 681, 8604, -4105, -7059, 422, 8482, -5807, -7045, -656, 7909, -6870, -6855, -1906, 6904, -7479, -7074, -1539, 5753, -7705, -6593, 1779, 6483, -6720, -6492, 1216, 7066, -6379, -7320, 745, 7549, -6165, -7033, 2580, 6196, -6765, -6865, 3231, 7389, -6855, -6161, 807, 7931, -6886, -6635, -1618, 9054, -6346, -6224, 111, 7726, -7114, -6286, -660, 7678, -7889, -6758, -535, 4985, -8295, -7477, 3375, 4806, -9169, -7831, -322, 4193, -8348, -6201, -1464, 1592, -7382, -5058, 7069, 4470, -5708, -6414, 2348, 6529, -4819, -8133, -1980, 6388, -4438, -8231, -37, 4415, -6682, -7884, -2708, 4539, -6973, -6781, -5731, 4423, -6897, -6183, -2770, 6284, -7722, -5781, 4690, 8229, -9102, -7824, 853, 8184, -8954, -9754, -521, 7077, -8370, -8627, 4278, 6724, -8038, -7383, 4335, 5122, -7950, -6656, 1154, 5418, -7815, -6658, -3322, 7793, -7736, -7051, -649, 5882, -8285, -7456, -1728, 6405, -9053, -8323, -2238, 8222, -8054, -8192, 5622, 6148, -9736, -7652, -1850, 1541, -11326, -6138, -3580, -1519, -7979, -4141, 9454, -1159, -5707, -4937, 999, -3198, -4545, -6825, -5701, -3105, -4472, -6888, -544, -2282, -5925, -5799, -5155, -2588, -4426, -3836, -8224, -2516, -4898, -3661, -69, -1069, -8402, -5415, 3214, -27, -9513, -6928, 627, 1183, -8143, -8008, -2683, 2060, -8162, -6887, 5728, 4046, -8551, -7194, 2147, 802, -7652, -5981, 1266, 1169, -7355, -6084, -2388, 474, -9124, -7698, 371, 436, -7548, -7873, -2116, -358, -8163, -8884, -709, 604, -8105, -8837, 1580, 1186, -9861, -7080, -4108, 510, -11234, -5162, -104, 1923, -8253, -4077, 6359, 1486, -5936, -4977, 953, 58, -3160, -5226, -5085, 4063, -4684, -6332, -1768, 5787, -6071, -5807, -4174, 2182, -3729, -3420, -9298, 1077, -3794, -2928, 4101, 1781, -8817, -6040, 2275, 4172, -8232, -6636, -1045, 2907, -5359, -5495, 555, 3329, -6718, -5367, 3996, 7244, -7577, -6739, -4839, 5239, -6982, -6148, 616, -1898, -6858, -5556, -206, -3577, -8157, -6415, 1350, -2835, -7074, -7173, 638, -1043, -7388, -7908, -3144, -2832, -7880, -8365, 850, -5458, -8930, -6156, -1521, -3160, -11498, -5114, 5369, 2931, -9498, -5492, 1795, 2870, -6637, -6374, 3149, 3827, -2611, -4797, 1127, 4365, -5609, -7181, -4729, 6, -7453, -6975, -3593, -1286, -3200, -3963, -6349, -649, -2943, -3427, 3595, 1873, -8590, -6266, 838, 1622, -8412, -6768, -2834, 1731, -4881, -5078, 5703, 2446, -6473, -4857, 2863, 306, -7624, -6672, -7217, -346, -6209, -5312, -951, 1723, -4681, -5253, 2465, 5427, -5546, -6278, -5691, 2775, -4859, -5887, 798, -2111, -5670, -6074, -2621, 487, -6324, -6086, -1540, 1040, -7181, -5081, -567, 923, -10073, -5018, 6039, -1220, -9860, -4791, 1594, 652, -7337, -5696, 5307, 3690, -3615, -5213, 419, 3922, -6257, -7257, -6691, -1125, -8129, -7299, -1945, -3661, -4252, -4323, 327, -1192, -4343, -4571, 888, -1490, -8094, -6494, 1312, -893, -7212, -6336, -2484, 133, -5387, -5212, 5902, -328, -7634, -5824, -245, -4210, -7146, -6175, -6153, -6482, -4130, -4280, 5190, -1087, -3913, -4346, 6233, 746, -5557, -6405, -6714, 2618, -4104, -6083, -4530, 2500, -1816, -4202, 1126, 4347, -2901, -4871, -3558, 5429, -6077, -5798, -1900, 4349, -9388, -5722, 6132, -747, -8841, -3864, 1773, 645, -7895, -4777, 6680, -64, -6832, -6307, -117, -1375, -8577, -8361, -7609, -2401, -7468, -7248, 2080, -257, -3465, -4844, 7186, 5321, -4602, -6367, -950, 3226, -7099, -7741, -2115, -1295, -5605, -6352, -3346, -1179, -5113, -5344, 5634, -1594, -6751, -6835, -3218, -3750, -5864, -6038, -3684, -2683, -2614, -4103, 6816, -2190, -5125, -4163, 4498, -3659, -5637, -5613, -4934, -3503, -4727, -5600, 62, 451, -3659, -5062, 1622, 2511, -5342, -6651, 248, 7097, -8602, -8849, -7106, 7354, -9745, -8514, 6565, -1021, -7962, -3467, 367, -146, -8379, -5476, 3817, -1620, -7267, -6276, -492, -5327, -7234, -6721, -3522, -1948, -4384, -5384, 4886, 2267, -2206, -4904, 7189, 675, -4814, -6875, 2304, 1300, -7304, -8069, -4292, 4666, -5332, -5560, -4937, -1784, -5590, -5127, 2297, -1075, -5171, -5729, -686, 172, -4030, -5510, -1917, 3366, -3410, -5583, 4764, 3726, -5556, -4578, 6213, 7347, -5602, -4233, -6762, 6163, -5285, -4526, 3429, 6366, -4713, -6185, -3360, 7861, -5487, -7543, 257, 764, -9488, -9140, -3581, 506, -11774, -8827, 5829, -3809, -7900, -3571, 3790, -1067, -7645, -5955, 721, 745, -6461, -6346, 2106, 1115, -6193, -6438, -3151, -366, -3504, -5683, 3058, -2055, -2650, -5776, 5688, -2893, -3291, -5768, 9025, 152, -6543, -7512, -4412, -1590, -8720, -7487, -12347, -1441, -5538, -5007, 425, -3726, -4950, -5578, 1772, -2629, -4471, -5009, 928, -540, -4554, -6495, 3960, -1591, -6150, -6387, 6595, -1291, -6780, -6179, -6528, -520, -6279, -6844, 7436, 3581, -5103, -7909, -3202, 7491, -6986, -9311, -9569, 5846, -8227, -7425, -4179, 1484, -11266, -7116, 4895, -1757, -8200, -4192, 1868, -5960, -7729, -6953, -673, -5796, -5705, -7121, 4516, -2477, -6040, -7742, -1952, -1432, -4842, -7900, 594, -1672, -3117, -7026, 3364, -1144, -4050, -6836, 6688, -7252, -5933, -7574, -3753, -8428, -7138, -7037, -9474, -4812, -4881, -5080, -324, -2984, -4217, -4069, 4505, 409, -5913, -3976, 5236, 2269, -5023, -6018, -820, 1705, -4849, -5660, 3445, -6416, -4835, -5739, -3631, -9948, -5502, -6055, 9260, -6550, -4812, -7424, -1461, -4920, -6581, -9456, -10794, -4186, -8857, -7302, -3804, -307, -11511, -6299, 5325, 3666, -8474, -4446, -1236, 5276, -6746, -5744, -836, 1102, -4376, -6172, 2165, -2381, -5210, -6177, -1584, -3830, -4539, -6579, 42, -3238, -2393, -6610, 3038, -1737, -2667, -7431, 3578, -5438, -2975, -6791, 118, -4023, -3642, -6560, -5480, -772, -3897, -6639, 4095, 4298, -3635, -5423, 305, 2631, -6109, -4991, 5236, -4242, -6544, -5417, -3049, -3346, -4830, -5326, 2843, 899, -3659, -6446, -5191, 1919, -3993, -6430, 4768, -4014, -4060, -6604, -1996, -7396, -3772, -5949, -3582, -2454, -6772, -5822, -1595, 2293, -10521, -6194, 9279, 411, -9143, -5836, -1585, 1797, -8381, -6955, -795, 4570, -4170, -6396, -4392, 3907, -3519, -5456, -3192, 161, -2853, -4796, 1216, -1193, -796, -6112, 1551, 558, -2396, -8511, 1650, -516, -2364, -8324, 1774, -1110, -1553, -7262, -740, 1349, -2799, -6767, 4754, 331, -3952, -6064, -2422, -292, -6216, -5716, 565, -3996, -4941, -5028, -2251, -6735, -3341, -4450, 2759, -6285, -2978, -6670, -4130, -4318, -4231, -7242, -124, -2226, -1992, -5851, -2937, -3505, -1470, -4953, 3997, 1781, -5069, -5399, -1940, 3102, -9119, -5962, 8587, -7120, -9214, -5314, 1788, -6480, -9180, -6895, 1256, -2927, -5797, -7811, -6338, -1141, -5275, -6975, -4125, -157, -2238, -5243, -1421, -582, -210, -6899, 1791, -3667, -2697, -8080, 2702, -49, -3724, -8329, 487, -3304, -3675, -6313, 894, -1812, -5843, -6880, -1092, -4203, -4497, -5359, -2286, -7382, -4346, -4776, 1436, -4308, -3050, -5468, -1828, -2796, -2402, -5263, 588, -1615, -3060, -6824, -3772, -2560, -3558, -7995, 768, -3268, -1940, -6889, -44, -2007, -980, -6175, 5255, 3025, -5383, -6268, -4209, 2888, -9504, -6154, 3678, -2468, -7857, -4478, 5523, -5142, -6847, -4673, 4058, -5892, -5577, -5602, -3329, -5329, -4794, -5356, -726, -3814, -2822, -5375, -1837, -3077, -1806, -6864, 2790, -3658, -3964, -6873, 5680, 3319, -5487, -6707, -6180, 4203, -4396, -3851, -1051, -4327, -5905, -4426, -5509, -7533, -4787, -4107, 1489, -5675, -4000, -3985, 3668, -5575, -3722, -5696, -2444, -4669, -2666, -5646, 228, -3556, -3319, -6504, -1386, -4902, -3968, -7481, 940, -5652, -3021, -6870, 4122, -3957, -2989, -6516, 2914, -3770, -7283, -6859, -3506, -719, -9357, -5814, 976, -894, -5587, -3639, 4475, -923, -4607, -3669, 1966, -3573, -4119, -3841, -142, -4262, -4112, -4560, 550, -3379, -3605, -4995, 692, -2506, -3377, -5671, 4418, -2551, -4878, -5120, 3399, -5151, -6809, -4742, -4441, -6195, -7669, -4121, -6333, -4793, -5866, -3128, -399, -2810, -4884, -3912, -25, -3085, -4946, -4615, 3151, -4341, -3880, -4702, -2343, -3083, -3412, -4526, 720, -1214, -4184, -5276, 522, -2378, -4280, -5836, 2990, -3109, -4029, -5766, 2254, -3583, -4173, -5100, 2398, -1146, -6272, -4416, -730, 1698, -7492, -4116};
#else
  const Q15_T expected[OUTPUT_SIZE] = {4107, -9805, 4509, -11374, 5700, -12542, 5961, -12841, 6402, -13243, 5947, -12857, 4955, -12922, 6620, -11927, 8546, -11408, 8547, -11331, 9015, -12023, 6212, -9596, 5115, -8367, 3641, -6033, 4497, -8229, 4677, -9361, 4417, -9878, 4708, -10563, 4460, -10810, 5748, -10392, 5265, -13768, 8393, -18944, 10460, -18776, 11176, -18615, 10671, -18016, 9305, -17132, 6786, -17580, 6252, -14800, 4495, -8783, 3615, -7530, 4635, -9851, 6978, -14699, 5324, -10489, 5774, -12251, 5481, -13320, 5684, -8994, 7127, -14145, 5941, -10448, 6458, -15583, 7175, -11246, 4576, -13904, 6476, -19516, 6986, -19717, 7645, -19398, 6846, -18320, 6701, -15995, 6393, -15967, 7370, -13948, 5886, -10576, 3659, -9171, 4363, -9466, 9268, -15948, 4407, -8399, 6698, -12735, 6637, -5142, 5355, -11675, 4485, -8880, 5889, -11961, 5169, -9699, 5348, -8773, 4758, -13628, 5770, -16335, 6305, -16575, 7760, -16913, 6733, -15727, 6711, -16592, 5087, -14904, 4674, -11732, 4224, -9206, 5200, -12864, 5789, -10983, 5587, -14455, 4525, -11005, 5578, -13701, 6336, -9805, 5526, -14083, 7597, -9854, 6322, -13131, 5265, -14092, 5037, -12303, 3934, -9336, 6435, -12616, 6307, -14312, 8291, -14469, 4136, -7198, 5763, -16328, 4762, -15600, 4959, -10823, 3514, -11200, 5413, -15548, 5975, -13872, 3649, -11463, 2983, -7189, 6049, -16154, 4482, -8247, 4842, -11580, 6402, -15069, 4770, -10919, 5956, -14303, 5709, -15162, 3238, -8596, 4240, -14242, 5687, -15841, 6577, -14489, 5783, -9987, 4530, -13957, 5934, -13773, 4159, -11669, 4873, -10104, 4817, -10415, 5842, -7390, 4326, -10014, 6143, -16402, 5342, -14375, 4123, -6599, 3758, -11798, 6170, -14175, 5789, -14811, 5156, -15204, 4176, -13339, 6348, -12163, 7360, -17006, 6974, -9606, 4502, -4687, 4962, -9711, 5689, -11088, 5037, -7514, 3764, -5842, 1441, -5251, 4202, -8014, 2131, -4316, 5431, -7106, 5134, -13004, 3917, -8310, 3778, -6397, 6409, -9276, 6468, -13602, 5096, -11311, 4411, -3829, 4337, -6167, 4959, -11121, 5726, -12585, 2515, -7858, 3408, -10755, 3784, -10497, 6183, -14356, 5219, -7652, 5150, -7586, 5341, -9922, 3296, -8413, 4287, -10374, 3693, -11143, 5028, -8833, 6009, -10408, 5237, -4201, 6096, -10900, 5649, -4899, 3387, -4911, 2669, -7126, 1256, -2588, 5553, -9150, 6270, -9404, 3378, -5124, 3261, -6932, 4003, -6286, 5474, -11150, 7544, -13933, 5931, -8129, 4791, -6395, 4993, -9484, 3840, -8418, 5969, -10875, 3777, -9605, 7429, -15769, 3566, -3974, 3987, -10835, 3229, -5502, 4331, -5432, 2713, -7044, 3371, -8280, 4838, -8876, 5206, -12871, 4213, -10412, 2961, -5303, 3741, -5501, 6749, -10825, 6471, -10808, 5412, -7642, 5576, -11409, 6373, -13385, 6741, -15969, 7666, -14399, 6958, -10899, 7205, -9979, 6270, -8977, 7476, -14484, 3752, -5748, 4873, -9233, 5902, -9952, 5347, -13986, 5072, -8961, 6776, -10247, 6055, -10908, 4869, -10458, 5350, -10391, 4231, -10752, 5317, -11979, 5536, -12058, 4214, -9777, 5728, -12804, 6718, -14609, 6922, -12925, 5508, -7728, 5479, -12056, 5169, -7507, 5914, -8900, 6970, -12048, 6605, -13861, 7745, -12464, 5984, -11694, 4877, -6502, 4160, -6273, 7641, -9333, 5564, -9451, 6668, -15252, 7695, -14076, 7834, -13501, 6442, -15175, 6398, -10790, 4568, -10629, 6368, -7292, 6381, -8124, 5980, -8605, 5292, -7952, 5198, -10211, 6223, -8798, 6880, -14880, 7762, -13893, 5294, -12102, 3999, -8337, 4404, -9089, 4247, -8634, 5275, -8045, 8105, -9605, 8604, -15383, 9747, -14441, 7319, -13144, 8824, -13218, 7139, -12038, 5209, -6496, 5885, -7715, 6570, -14996, 6704, -12642, 7708, -12826, 8943, -15082, 6949, -13561, 7952, -10260, 7245, -13545, 7620, -9962, 4810, -6448, 6355, -10390, 9089, -10247, 8350, -13682, 11501, -14564, 10129, -13714, 12388, -15783, 10770, -13186, 12137, -12351, 9889, -10589, 8713, -15533, 8395, -11371, 7873, -9747, 9270, -11780, 9003, -12372, 9585, -14599, 12210, -16753, 10133, -13553, 9065, -12456, 6687, -7402, 4998, -9545, 5957, -9982, 7580, -12432, 7429, -12992, 9076, -14799, 8672, -12271, 9736, -14268, 9491, -12952, 9456, -14220, 8300, -12375, 7618, -12864, 7106, -10948, 6866, -9395, 8301, -12448, 9132, -12573, 9219, -13154, 8396, -13450, 8224, -10441, 7532, -11293, 5739, -9401, 4251, -6858, 9337, -8453, 11210, -10645, 12643, -11707, 13115, -12578, 13308, -12615, 11835, -11209, 11445, -10990, 11282, -11177, 11168, -10781, 10563, -10570, 10551, -10077, 9448, -9263, 8742, -8144, 7207, -6841, 9285, -8722, 10151, -9275, 10370, -9708, 10366, -9784, 9109, -8903, 7771, -7172, 11524, -10537, 13705, -12732, 12594, -11521, 12535, -11831, 12550, -11813, 12329, -11412, 12789, -12017, 12203, -11697, 9404, -9057, 7452, -7205, 8517, -8331, 10764, -10361, 10262, -9491, 8267, -7817, 8156, -7187, 9319, -8671, 8750, -7673, 10993, -10251, 11961, -11104, 9068, -8659, 11057, -10346, 13542, -12749, 12324, -11640, 12498, -11874, 12930, -11862, 11390, -10594, 11396, -10935, 10313, -9920, 10053, -9406, 7568, -7263, 7929, -7344, 10239, -9543, 7486, -6662, 9633, -9110, 6902, -6157, 8755, -7836, 7380, -6731, 9327, -8742, 10098, -9285, 9068, -8541, 10102, -8820, 11800, -10891, 11074, -10025, 10154, -9503, 9079, -8149, 9540, -9112, 11324, -10600, 9633, -8928, 10254, -9731, 9391, -9099, 9305, -8215, 8888, -7983, 7947, -7581, 9664, -9178, 9121, -8686, 10165, -9255, 7916, -7171, 9910, -9168, 11419, -10892, 9762, -9193, 8435, -7432, 8792, -8418, 9802, -9222, 6050, -5074, 4474, -3783, 10083, -9657, 10253, -9499, 7718, -7298, 7656, -6700, 10106, -10004, 10404, -9780, 7685, -6782, 8014, -8030, 10868, -9844, 9121, -8120, 10228, -9506, 9876, -9116, 10608, -9840, 11798, -11160, 11318, -10689, 6171, -5399, 8095, -7782, 9920, -9205, 7214, -6475, 6221, -5900, 8473, -7991, 8547, -8378, 7988, -7368, 6550, -6050, 7715, -7616, 7470, -6247, 7224, -7046, 9414, -9022, 10285, -9009, 7993, -7095, 9608, -9125, 11954, -10905, 11589, -10964, 11653, -11477, 11823, -11459, 7939, -7595, 9607, -9344, 8329, -7905, 5873, -5273, 7883, -7292, 8569, -7591, 4901, -4613, 5028, -4983, 6390, -6132, 8030, -7722, 7070, -6052, 6947, -6860, 10727, -10127, 8990, -8245, 8283, -7308, 9109, -8951, 9411, -9277, 8614, -7676, 5934, -5513, 5827, -5138, 7955, -7355, 9432, -8787, 8271, -7552, 8573, -8173, 8072, -7788, 8167, -7391, 4721, -4421, 5255, -5048, 6469, -6266, 7696, -7803, 7796, -7292, 8022, -7649, 6807, -6090, 8699, -7838, 6484, -5480, 7666, -7667, 4124, -3221, 4783, -4153, 5708, -5203, 4416, -4039, 8848, -8468, 6295, -5706, 7038, -6235, 6832, -6005, 8219, -7658, 10167, -9542, 9361, -8743, 4605, -4261, 2718, -2677, 5858, -5412, 6465, -5999, 9572, -8999, 7578, -6821, 8749, -8175, 4365, -3298, 5498, -5051, 3615, -2366, 2369, -1548, 6081, -5038, 7511, -6780, 9028, -8624, 7866, -7278, 7245, -6463, 5858, -5640, 6647, -6325, 8636, -7458, 8286, -7411, 6358, -5907, 5014, -4072, 8456, -7826, 9561, -9333, 9183, -8218, 7171, -6189, 7486, -7223, 7683, -6531, 7990, -7506, 5487, -4451, 2740, -2472, 7053, -5906, 9959, -8920, 7248, -6698, 6453, -5653, 7069, -6602, 7768, -7043, 8856, -7950, 8750, -7448, 9535, -8474, 8388, -7613, 6977, -5978, 8665, -8209, 9971, -9220, 8637, -8198, 7267, -6395, 9554, -8901, 7360, -6066, 8329, -7834, 8816, -7854, 9113, -8906, 9839, -8757, 9961, -8905, 5397, -5224, 4939, -4626, 5857, -5343, 7733, -7744, 11252, -10355, 10494, -9549, 10337, -9783, 10489, -9736, 8703, -7694, 9161, -8400, 7053, -6170, 6434, -6566, 7460, -6661, 9251, -8612, 7170, -6175, 7424, -6726, 10040, -8919, 10270, -9835, 10480, -9545, 8057, -7181, 7231, -6857, 7570, -7236, 5304, -4621, 8385, -8133, 11687, -10492, 11368, -10937, 11007, -10421, 11388, -10367, 9680, -9124, 8883, -8281, 9314, -8072, 9919, -9339, 9643, -8542, 9364, -8782, 9899, -8948, 10188, -9610, 9527, -8717, 9892, -9543, 6772, -6189, 6086, -5479, 10664, -9951, 10398, -10211, 8869, -7961, 9531, -9229, 11463, -10146, 10578, -10119, 11383, -11026, 8715, -8056, 9104, -8743, 11120, -10358, 10235, -9406, 10852, -10345, 10864, -10065, 10488, -10229, 10825, -9878, 11645, -10778, 11307, -10668, 9050, -8439, 7103, -6764, 8696, -7867, 10247, -10002, 11944, -12083, 11928, -11748, 11980, -12129, 12558, -12412, 11388, -11367, 11542, -11978, 7785, -7609, 8317, -8504, 11976, -11629, 12261, -12114, 11081, -11362, 10948, -10925, 11984, -12288, 12321, -12157, 12009, -12066, 11607, -11320, 11387, -11215, 10609, -10730, 9364, -9132, 10239, -10454, 10673, -11039, 10078, -10551, 10917, -11347, 11681, -11924, 11115, -11355, 11239, -11411, 11180, -11737, 12266, -12689, 11405, -11811, 10834, -11427, 10564, -11095, 10010, -10058, 9357, -9732, 9867, -10084, 9793, -10268, 10292, -10480, 10811, -11238, 10032, -10410, 9558, -9671, 12540, -12403, 12919, -12532, 11051, -10770, 11631, -11491, 12698, -12359, 10928, -10815, 10678, -10631, 12638, -12198, 11721, -11873, 10766, -10864, 11128, -11368, 11297, -11258, 9897, -9962, 10596, -10561, 11137, -11061, 11030, -10946, 10716, -10546, 12099, -12408, 11706, -11528, 11096, -10964, 12346, -12102, 12673, -12200, 11092, -10830, 10378, -10341, 11318, -11069, 10387, -10297, 11647, -11844, 11648, -11174, 10000, -9943, 9473, -9308, 9736, -9506, 10529, -10197, 9300, -9226, 10769, -10401, 11808, -11435, 11597, -11733, 11435, -10995, 12415, -12039, 12502, -12033, 12054, -11683, 12335, -12102, 11996, -11709, 11089, -10899, 9991, -9991, 8973, -8972, 9568, -9579, 11706, -11710, 11445, -11391, 9697, -9818, 8805, -8875, 9729, -9053, 9134, -8964, 9560, -9147, 10934, -10691, 12229, -11386, 11418, -11251, 9889, -9205, 10777, -10381, 11701, -11330, 11656, -11207, 9984, -9966, 9788, -9997, 9461, -9509, 7875, -7610, 6793, -6774, 8598, -8728, 11118, -10808, 9799, -9833, 7704, -7872, 8206, -8272, 8252, -7790, 8836, -8684, 8864, -8747, 10566, -10102, 10856, -10606, 10606, -10362, 9099, -8841, 9379, -8647, 10480, -10111, 10987, -10812, 9266, -9428, 8943, -8633, 8695, -8225, 8246, -8245, 8067, -8136, 9007, -9459, 11138, -10896, 9913, -9574, 7813, -7861, 7059, -7006, 7490, -7457, 7846, -7949, 8701, -8733, 10261, -9528, 9157, -9230, 8577, -8622, 8622, -8593, 8814, -9196, 10013, -10162, 11269, -11238, 9728, -9789, 9824, -9622, 9150, -8662, 8020, -7958, 8567, -8783, 10293, -10457, 8223, -8099, 8007, -8301, 7828, -8417, 7835, -7538, 7398, -7236, 8306, -8434, 9004, -9151, 8601, -8880, 7858, -8004, 7151, -7679, 8084, -8096, 8834, -9072, 9284, -9571, 8958, -9060, 9173, -9286, 10183, -10257, 7567, -7600, 6882, -6477, 7611, -7724, 9125, -8835, 7003, -7366, 7002, -7242, 6180, -6214, 7041, -7640, 6389, -6420, 7534, -7450, 8500, -8589, 8488, -8579, 5258, -5579, 5380, -5886, 5905, -6779, 7244, -7622, 8897, -9249, 9506, -9458, 9168, -9161, 8530, -8281, 7573, -7639, 6951, -6879, 6877, -7155, 8894, -9217, 8003, -8020, 5187, -5219, 3763, -3769, 6214, -6257, 6787, -6859, 7740, -7763, 8337, -8224, 8294, -7939, 4677, -4546, 5055, -5219, 5411, -5640, 4663, -4647, 6035, -6365, 9111, -9451, 8689, -8663, 8486, -8649, 8567, -8426, 8309, -8349, 7596, -7517, 8716, -8537, 9925, -9498, 8376, -8293, 6930, -6384, 7190, -7480, 7859, -7862, 8130, -7697, 7298, -7315, 8000, -7783, 6428, -6255, 6660, -6551, 5215, -5091, 2787, -2346, 4897, -4911, 8321, -8160, 8145, -8163, 7272, -7615, 8057, -8461, 8004, -8176, 9501, -9379, 9377, -9131, 10229, -9742, 9651, -9600, 8268, -7843, 8503, -8594, 7990, -7931, 8499, -8314, 8226, -8730, 7968, -7542, 7456, -7099, 8843, -8436, 9011, -8819, 6579, -6287, 7890, -7432, 8702, -8662, 7854, -7795, 8280, -8372, 8958, -8966, 9046, -9102, 10423, -10636, 10481, -10764, 10352, -10262, 10792, -10671, 9793, -9844, 10070, -9912, 8846, -8861, 9766, -9126, 9805, -9744, 9263, -9079, 8601, -8321, 9781, -9543, 9411, -9319, 7628, -7603, 7736, -7411, 8890, -8985, 8862, -8842, 9255, -8740, 9256, -9045, 9355, -9120, 10414, -10545, 11528, -11454, 9591, -9801, 10360, -10253, 10265, -10570, 11912, -11226, 9538, -9414, 9724, -9510, 10900, -10752, 10950, -10820, 11046, -10704, 10480, -10297, 9944, -9851, 8988, -8914, 8314, -8275, 9246, -9211, 11771, -11465, 11740, -11025, 8791, -8217, 9518, -8597, 10443, -9944, 11264, -10983, 10543, -9851, 10194, -9720, 11550, -11196, 12851, -12517, 11309, -10729, 10507, -10157, 11815, -11537, 11206, -10929, 10973, -10412, 10748, -10406, 10495, -10008, 10309, -9769, 10510, -10120, 11257, -10790, 10281, -10294, 11451, -11181, 8725, -8530, 8965, -8779, 9615, -9281, 9581, -9122, 9128, -8706, 8787, -8619, 9447, -9109, 10551, -10193, 10423, -10161, 10437, -10106, 10500, -10115, 9885, -9701, 10596, -10228, 10707, -10397, 9982, -9574, 9608, -9278, 10058, -9565, 10201, -9795, 1858, -410, -8102, -4622, 1778, 5362, -7595, -6393, 2687, 7167, -8969, -7761, 2848, 7752, -10341, -8904, 2480, 7683, -9652, -8610, 3395, 7326, -8569, -7619, 2716, 7012, -7522, -6387, 2674, 7313, -8116, -6095, 4416, 8326, -7995, -5849, 501, 7791, -7972, -5650, 608, 4648, -7370, -4840, -169, 7624, -4492, -2132, 5421, 10528, -4119, -2536, 3164, 12233, -2587, -597, 600, 5922, -5474, -4102, 3498, 8803, -7207, -6031, 4433, 7877, -8536, -6698, 814, 6678, -4541, -3579, -1271, 6324, -4811, -3186, 401, 8444, -8015, -4552, 2618, 274, -7220, -2895, -450, -1481, -4002, -2164, 3118, 1490, -2071, 780, 2980, 393, -3148, 288, 3749, 746, -2368, 751, 3486, -74, -1943, 780, 2180, -64, -4684, -2319, 1681, -822, -5245, -2096, 15893, 6916, -6102, -3165, 2852, 11589, -9791, -7619, 2057, 9768, -9341, -7320, -8488, 4866, -6691, -3815, -4052, 284, -5644, -3290, 5925, -9185, -5141, -2028, 1701, 4304, -6286, -4467, -1341, -3221, -5818, -4127, -3556, -239, -6333, -4106, -5866, -1451, -3640, -1594, -906, 671, -6164, -3603, -1571, -3514, -9285, -3823, 2287, 2757, -6329, -2332, -3914, 2504, -2809, -1143, -987, 3448, -159, 2011, -1891, 1785, -1151, 1771, 894, 1725, -2953, 163, 90, 2787, -1418, 1249, 578, 2444, -2752, -195, 4387, 2237, -1549, 1886, 11529, -4803, -4899, -910, -146, -7288, -5574, -3284, -2486, -6748, -4779, -2029, 5037, -4750, -6917, -3420, -8662, -6719, -4433, -1231, 2131, -3943, -5438, -2730, 1902, -1763, -1188, 942, -5729, -2021, -4355, -2309, -7967, -5394, -3429, -907, -6330, -3456, -4025, -1388, -4663, -5365, -8671, -6013, -9604, -9251, -11630, -6497, -2896, 4631, -8120, -4848, 2076, 5398, -7508, -6967, -1933, 8866, -5452, -4528, -1206, 6001, -6115, -4798, -3567, 10898, -4886, -2793, -1163, 5014, -2802, -290, 2429, 2773, -2093, -525, 11892, 3262, -5061, -1746, -364, -50, -7965, -4635, -5868, -5377, -4890, -2491, -1270, -7098, -5190, -1599, 9181, 6089, -4036, -3033, -1581, -311, -6190, -4293, 5612, 4416, -7384, -6268, -4949, 1981, -8771, -6483, -8296, 174, -5593, -4291, 8626, 1674, -3218, -1904, -8412, 1695, -7270, -5389, 8880, -9085, -9509, -8197, -8566, -2625, -9320, -6028, -474, 1025, -2941, 684, 6675, -2833, -2195, -1959, 1101, -6659, -2114, -1384, 9619, 746, 1709, 2482, -10030, -1745, 1522, 3467, -3605, -2754, -1928, 633, 3801, 373, -1534, -360, 12969, -5631, -2668, 834, 4633, -1943, -2148, 1165, -3637, 1147, -2857, -478, 746, -4672, -5212, -2465, -9892, -4396, 1259, 2590, -3043, -12462, -1040, -22, 4120, -5357, -4106, -2954, -3, -1395, -6231, -4183, -6366, -1314, -2527, -1290, 4401, -9030, -2498, -1207, -1129, -8051, -4048, -2945, -10107, 105, -4529, -3683, -5905, 1431, -8245, -5428, 4104, -5601, -2110, 1744, 1047, -3641, 1382, 2443, 4453, 1836, -2340, -614, -3454, 3307, -1420, 175, -3780, -9704, -306, 1756, -11268, -3726, -1312, 554, 3812, 530, -1298, -41, 5837, 5958, -2219, 566, 1743, 7723, -2059, -96, 3486, 4965, -2791, -531, 11127, 11055, -1587, 362, -4872, 7078, 2043, 3218, 2452, 3533, 544, 1570, 578, 3538, -216, 1113, 7267, -3166, -118, 2012, -8127, 136, -1448, -428, 367, 1415, -3051, -2988, 4745, 1835, -5504, -4777, 5713, -2201, -6866, -6097, -2582, 360, -9950, -7315, 864, -1403, -4676, -884, 5636, 1282, 1263, 1801, 5785, -118, -873, 1620, 6517, -13265, 1107, 2683, 1646, 1793, -483, 1455, -8474, 4937, 647, 1625, 9231, 7809, 113, 1741, -6340, -3294, -132, 1739, -3646, -5106, -1532, 131, -526, -5381, -4113, -2725, 7083, -6838, -2561, -880, -4990, 3100, 3146, 3828, 2616, -540, 622, 1315, -5108, 2308, 809, 1899, 3011, -607, 713, 2030, -6970, -4425, 806, 1849, 1576, 469, -4996, -4910, 1859, 7354, -6102, -4904, 8189, 12044, -2567, -2116, -1564, 13753, -5662, -2855, 1808, 3060, -1082, 3778, 294, -2322, 3434, 4714, 451, -6521, -973, 1313, 4370, -5309, -1179, 109, 4674, -13129, -2178, -466, 4948, -1819, -1649, -1073, 11024, -9336, 1896, 3843, -5254, -855, 4201, 5275, -5, 4512, 1888, 2824, -7863, -715, -998, 887, -2275, -2837, 1697, 2815, -5720, -2145, 5059, 6211, -3089, 12859, 6416, 6596, 3789, -2867, 2451, 4786, 2366, 706, 3066, 5118, 2563, -2785, 454, 2464, 6033, 9151, -794, -400, 5212, -3488, -5713, -4498, -361, -4861, -1163, 41, -4353, -14290, -1174, 2148, -6444, -3188, -3059, 1303, 4927, 8484, 3482, 3452, -10183, 4427, 1334, 2323, 8917, 5052, 935, 1847, -2764, 2383, -1591, 15, -2135, -10782, -2414, -1080, 2389, -6202, -297, 1707, 8871, -4235, 6494, 7959, -10707, 6669, 8196, 9107, 1286, -234, 3357, 5157, -8236, -592, 6975, 7574, 2730, -8865, 2139, 2869, -377, -10462, 4065, 5477, 3670, -5297, 4083, 5798, 8112, -9692, 8683, 10033, -1187, -8517, 1509, 2966, 1666, -17731, 52, 1758, 1289, -6229, 3281, 4149, -703, -6060, 4246, 5134, -6180, -3952, 2092, 5814, -5212, -2742, -846, 2616, 5289, -13104, 353, 1177, -222, -5445, 452, 1143, -254, -11291, 3097, 4137, -5772, -10473, 3458, 5729, -7569, 4109, 3385, 4427, 13568, -669, 3160, 4727, -10604, -1686, 5288, 6758, 3473, -10571, 6399, 7573, -2950, -4489, 1159, 3158, 2639, -13567, 948, 2082, 1217, -2234, 782, 1931, 4046, -1923, -237, 1083, 116, 2894, 3877, 4747, -1045, -4821, 2902, 3556, 280, 3538, 2065, 3220, 3169, -8556, 8013, 9258, -3777, -9916, 10210, 11565, -2144, -5707, 6603, 7493, 2258, -6507, -1550, 2158, -3505, -1233, 55, 3741, 9797, 8944, 4898, 5210, 3531, 1857, 6397, 6753, -7833, 7696, 7368, 7398, 4405, -6927, 4529, 5373, -4740, -7490, 7480, 7651, -5955, -3047, 6414, 6948, -4335, -7453, 6237, 7082, 9932, -9185, 8642, 8866, -1920, -4558, 3469, 4630, -5014, 7682, 1152, 2497, 3112, -127, 2397, 4471, -843, -8738, 1414, 3470, 3740, -4950, 1504, 2480, 1081, -5143, 6252, 6876, 5209, -3109, 5652, 7281, -3762, -9052, 6015, 6584, 1191, -4909, 3951, 4746, -26, -5034, 2861, 3135, -2813, 2083, -4522, -2123, 4463, -4066, 1664, 5863, 1557, -9804, 6931, 8786, 4955, 4925, 7375, 7954, 1489, -5336, 5788, 7397, -1534, -5503, 2611, 4169, 900, -4090, 6580, 6707, 10013, 517, 7155, 7469, 1167, -4909, 3351, 3850, 3856, 4142, 3209, 2734, 8869, 5370, 1285, 2287, 8997, -1274, 5001, 6152, -6546, -8811, 6407, 8448, -8159, -1439, 6655, 7998, -5806, -728, 6753, 7377, -812, -7750, 6426, 7266, 4490, -10159, 6520, 7880, -10320, 1715, 5721, 6332, 3296, 1871, 4727, 5415, 1927, 3383, 6401, 7099, -22, 5535, 1189, 4648, 923, -5865, 1748, 5749, -8766, -4641, 5521, 6447, 4916, -8662, 8417, 9954, 1570, -8126, 7255, 9039, -9239, 543, 1980, 3668, -3440, 138, 3343, 4081, 10161, 2414, 2177, 2626, 3606, 4161, 3447, 3524, 3992, -3892, 1609, 2172, -3259, -9512, 4535, 5864, -7487, -11018, 6546, 7384, 3739, -7746, 3247, 5208, 1470, -11251, 5479, 6164, 1415, -11048, 6058, 6544, 5378, -5955, 6449, 7516, 7722, -990, 5665, 6621, -6695, 58, 7609, 7976, 5277, -1509, 6681, 7114, 1463, 634, 7859, 7682, -912, -3175, 5053, 9203, -3157, -2498, -1296, 1901, -4462, -1481, 3607, 4090, -3005, -2833, 3664, 4793, 1360, -4163, 6815, 8224, 1064, -8502, 2939, 4759, 4771, 3279, 5917, 6988, 5544, -8178, 3351, 4609, -722, -3949, 6930, 7698, -66, -5288, 5120, 6668, -2355, -7456, 2198, 4642, -6814, -8989, 1090, 1934, 6875, -7574, -43, 1395, -8151, -3145, 5528, 6219, 2123, -3592, 5441, 6667, -365, -3175, 2264, 3850, 439, -6232, 5038, 5665, -609, -9222, 5247, 5659, 254, -7704, 4740, 4815, -1250, -11316, 6448, 6178, -2969, -4925, -84, 3640, -5835, -1665, -4726, -422, -4761, -3476, -601, 2004, -5197, -3764, -2319, 489, -3923, -5231, 266, 3169, -502, -1808, -1616, 1029, -1654, -6383, 2093, 5109, -1726, -6294, 2982, 5831, 6829, -846, 4158, 7651, -1016, -7198, 135, 3590, -5978, -2807, -3804, -323, -4842, -4529, -4001, -1268, -5692, -4759, -1451, 1488, -8804, -3968, -91, 2718, -3706, -4241, -514, 2247, -2561, -5425, -1708, 1429, 4127, -1212, -883, 2305, 8375, -3884, -1843, 636, 3523, -3719, -2489, -446, -3874, -6022, -3113, -1307, -2525, -5868, -2146, 1953, 2049, -986, -9435, -5636, -139, -1220, -8784, -7730, 1567, 650, -8650, -7625, 1368, 1868, -8612, -8134, 1654, 3214, -8417, -7908, 1354, 3225, -7925, -6950, 306, 748, -9202, -7168, -670, -24, -9232, -6430, 2776, 1392, -10847, -6894, 45, 772, -10792, -7939, 1342, 2517, -11649, -8759, 811, 358, -10521, -7167, 5144, 4452, -9037, -5976, -1280, 5142, -9318, -6267, 744, 4029, -8983, -6882, -1041, 3950, -9459, -7725, 1697, 2429, -9936, -7473, 492, 1584, -8690, -6608, -503, 1624, -7452, -5686, -197, 1901, -8211, -4493, 1304, 1728, -10939, -4517, 2412, 3591, -8370, -6518, 5460, 6215, -7606, -5084, 2880, 7627, -7015, -4022, 3144, 7966, -7379, -3390, 1266, 6455, -7657, -3097, 664, 6616, -8642, -4405, 3011, 5729, -9446, -5300, 9101, 7021, -12453, -7892, 834, 6684, -10789, -8778, -438, 6768, -12616, -10685, -2844, 4275, -10235, -6715, 3283, 1865, -11303, -6671, 2236, 96, -9281, -5415, -253, 6693, -7782, -4973, -1979, 2083, -10244, -7801, -508, 4702, -9277, -6616, -1434, 3512, -9732, -7201, -207, 1794, -7643, -5734, -1299, 563, -10058, -4388, -376, 507, -11472, -5318, 1437, 1335, -9107, -6859, 2066, -34, -8441, -4931, 1467, -607, -7536, -3307, 1759, -996, -8025, -2783, 454, -2371, -7665, -2013, 2914, 573, -8520, -3676, 4297, 853, -9847, -5676, 3730, -1438, -12168, -7251, 1348, -739, -11920, -9249, -1730, -134, -11237, -9190, 2642, 210, -10529, -7574, -1524, 38, -10903, -6977, 6607, -4076, -6704, -2721, 1940, -2250, -9465, -5904, 3397, -2169, -7182, -4829, -4652, -3427, -9278, -6673, 2740, -1744, -7547, -4498, -3329, -2698, -6717, -4430, -3243, -1650, -9287, -4039, -62, 3706, -11207, -5245, -218, 2545, -8969, -7540, -2127, 2853, -8011, -5610, 108, 6103, -6546, -3866, -1846, 6475, -6276, -1987, 1218, 2419, -4615, 582, 2502, 1188, -4857, -1063, 4032, 4785, -7498, -4039, 390, 3195, -9838, -5869, -437, 391, -9107, -6493, -1769, -1786, -8383, -5996, 6693, 4342, -8491, -7013, -6478, -1448, -7983, -6031, 3389, -2227, -6605, -3502, -483, -5568, -8193, -5019, -910, -3007, -7479, -5497, 3348, -5, -5760, -4936, -3619, -2166, -5854, -4414, -944, -4529, -5869, -3790, -3862, -1754, -8745, -3959, 3485, 4831, -10100, -4293, -3752, 3877, -5642, -4970, -741, -35, -5237, -3173, 6994, 2969, -3437, -658, -6386, -420, -4829, -1887, -472, -587, -2474, 2215, 2203, 174, -1945, 1799, 5094, -3274, -6571, -2372, 2305, -1020, -7734, -4145, -3221, 69, -7126, -4200, 2518, 365, -6414, -3949, 3395, 255, -6853, -3960, -7158, -3856, -5277, -3765, 1492, -1160, -5596, -3090, 590, 1769, -6955, -4541, -3584, -58, -6399, -3681, 5139, -5613, -3836, -2277, -1349, -3031, -5656, -4149, -644, 367, -5239, -4772, -3375, 114, -7502, -4146, 4419, -3806, -9838, -3233, -1967, -3230, -5453, -3530, 2353, 2179, -5419, -3436, 4165, 3491, -5640, -2676, -5423, -2573, -5411, -2446, -1228, -837, -4248, -132, 3869, 540, -3794, -704, -99, 380, -5676, -2040, 5312, 2831, -5670, -3026, -1822, 1839, -7269, -5244, 6304, 2497, -6993, -5021, -3788, -274, -6731, -4239, -3293, -644, -2662, -684, 1506, -919, -6037, -4680, 3944, -1787, -7009, -4099, -3406, -547, -6570, -4575, -1735, 710, -4403, -3494, 364, 2824, -7116, -5312, -1297, 2434, -9583, -7514, -3909, 1987, -10719, -6552, 3659, 812, -7825, -2050, 3307, 217, -3289, -1709, 5354, -533, -5505, -3039, 123, -3478, -7192, -4055, -2869, -2014, -5535, -3508, 33, 526, -4427, -1892, 8285, 4253, -3555, -1799, -6344, 1880, -5009, -2543, 4138, -2750, -6745, -4056, -2662, -1673, -7934, -6266, 3811, -714, -8016, -6471, -577, -1848, -6293, -4431, -1407, -984, -4875, -3739, 411, -441, -5560, -4640, 2900, -1412, -6865, -3778, -1303, -901, -6340, -3513, 32, 1435, -5893, -5331, 3833, 4352, -8276, -7365, 2831, 6310, -10287, -10337, -6493, 8306, -11680, -9110, 3899, -109, -8010, -1823, 1050, -858, -4668, -3455, 913, -3685, -6791, -4647, 185, -1802, -7409, -5550, -1182, -4089, -6168, -5122, -353, -1536, -4632, -4049, 6625, -5799, -5368, -3545, -3925, -2440, -6224, -4679, -1336, 2604, -5484, -3477, -1239, -732, -7316, -4978, 241, 179, -6130, -4654, 3503, -195, -4636, -3428, -4455, 4727, -6217, -5558, 1786, -1279, -6010, -4780, 3296, 5875, -5710, -2991, -2131, 4209, -5884, -4299, 5823, 9027, -5324, -6427, -3342, 1773, -7789, -7456, 4011, -2870, -7588, -7389, -4405, -3626, -10069, -8121, -1832, -3293, -8843, -2976, 5443, 2581, -5468, -4691, -4084, 3082, -6418, -5033, 5145, 4882, -7487, -6399, -3715, 2444, -6852, -6553, 83, -3351, -5443, -4954, 329, -3288, -3826, -3070, 10752, 1198, -3722, -2216, -9105, 1364, -4646, -2877, 2638, -1044, -5396, -3045, -4261, -948, -5196, -3577, 271, -3719, -6031, -4819, -1286, -5769, -6100, -4239, 2014, -3725, -4394, -3106, 6547, -4316, -4749, -2349, -7866, -4704, -4374, -2157, 5664, -5277, -4773, -5034, -1839, 5557, -3544, -3449, -3520, 331, -6299, -5948, -2225, -911, -7699, -4088, -3787, -935, -7998, -2775, 5638, -7800, -5638, -4773, -3231, -5780, -6370, -5709, 5576, -4886, -7899, -7426, -4402, -2633, -6350, -5282, 2396, 2752, -2565, -2829, 6866, -559, -2985, -3514, -1532, -5186, -3623, -2728, -3585, -6148, -3689, -1961, 565, -6263, -5154, -2768, -4148, -6968, -4605, -2704, 13, -1073, -4875, -2736, 8632, 2840, -2112, -1099, -207, 1340, -2446, -1846, 3285, -4286, -969, -67, -2436, -3078, -2426, -534, 8580, -4755, -1881, -1051, -1260, -6845, -4033, -3727, -7980, -4834, -4164, -3697, -3957, -2683, -7896, -2659, 3808, 6604, -4527, -263, 35, 8161, -1777, -2377, 6234, 1502, -2547, -4065, -4680, 2224, -3365, -4791, 271, -5827, -4535, -4072, 763, -4331, -3373, -4282, 3585, -3113, -1746, -2685, -2190, -5466, -1972, -2766, 3087, -4520, -3156, -2918, -5951, -2701, -3223, -2432, 4600, 3062, -2444, -1308, -2005, 3559, -3971, -2334, 6367, -1754, -3613, -1641, -101, -4027, -1570, -869, 4877, 1085, -214, -442, -5473, 538, -2254, -1601, 2075, -4774, -2473, -1273, -2190, -8929, -1930, -1425, -190, -4434, -1687, -1750, -2267, 655, -6576, -2864, 10687, 1691, -5468, -639, -4580, -3162, -4300, -3586, 6095, 5073, -1639, -2898, -9120, -892, -2352, -4122, -622, -2340, -4674, -3199, 1916, -2543, -2356, -3137, 2325, -1452, -2256, -3450, -442, -3042, -2343, -3744, 2903, -529, -2407, -4320, -1455, 2172, -3722, -4752, 7718, -630, -3785, -2817, -4088, -3107, -4335, -2090, -1015, -1877, -3412, -1355, -1430, -1217, -2803, -2316, 4628, -6910, -1155, -928, -1461, -6631, -2798, -1551, -414, -2417, -561, 523, 1098, -1630, -278, -135, 1510, -998, -1503, -1814, -2353, 3609, -5676, -1829, 7591, -7211, -5419, -66, -4167, -7589, -1983, -1373, 5615, -5287, -651, -443, -6839, -3739, 675, 457, -504, 31, -2257, -649, 788, -1902, 466, 14, 1489, -1930, 75, -2570, 3289, -817, -354, -3419, 1992, -2318, -1605, -4259, 1231, -2846, -4317, -3707, 1367, -3940, -3823, -2273, -3247, -6903, -1712, -311, 1093, -5032, -1878, -2324, -130, -3165, -635, -1140, 2331, -2484, -633, -529, 551, -3642, -1881, -2233, 417, -2725, -1561, -2388, 3741, -299, -974, -2362, -492, 4250, -1262, -2411, -2905, 353, -6914, -1975, 2386, -1698, -5238, -2106, -1184, -1789, -696, -3183, 5725, -4627, 2308, 455, 411, -4104, 2361, 922, -181, -3051, 255, -709, 3183, 1035, 2703, 378, -2627, -586, 2249, -650, 6008, 6016, 4174, 3341, -7734, 4204, 1768, 1585, 1064, -4507, -2482, -151, -3242, -6415, -3225, -1641, 855, -5076, -1394, -781, 6001, -1226, 2227, 1604, -2461, -2622, 1777, 1439, 195, -3011, -792, -478, 4006, -1987, -373, -1064, 26, -3515, -907, -2796, 6094, -4031, -418, -2665, -2721, -6149, -2628, -4022, -6020, -2882, -6951, -2362, -987, -45, -5718, -2494, 1451, -1204, -1937, -4088, 937, -1524, 245, -1807, 2300, -3341, 87, -1737, 198, -2571, -157, -1587, 3799, -1445, 1569, 27, -3457, -2869, 1892, 483, 7678, -3701, 2726, 3776, -8223, -5420, 1370, 3525, -2356, 333, -2766, -363, 2600, -147, -3084, -2136, -1763, -382, -3563, -2699, 2526, -3023, -23, 1373, -657, -4376, 42, 1595, 1846, -1877, -1793, 346, 2799, -2633, -1049, 107, 3183, -1187, -1654, -1760, -2034, -743, -3079, -4199, -1161, 121, -3980, -4700, -3151, 2298, -8207, -5020, -10, 3759, -4608, -3677, 2134, 5861, -4335, -5565, 1028, 7830, -3029, -5557, -44, 7326, -3552, -5911, 732, 7412, -5045, -5270, -382, 7954, -6079, -4220, 85, 6724, -6892, -4164, 760, 5275, -7037, -4193, 2933, 6108, -6135, -5000, 1173, 6584, -5462, -5866, 453, 7006, -5103, -5597, 2893, 5909, -5995, -6022, 3004, 7067, -6447, -5384, 787, 7239, -6447, -5881, -1867, 8390, -5800, -5369, 75, 7073, -6394, -5344, -1044, 7204, -7081, -5563, -357, 4745, -7641, -6304, 3090, 4640, -8316, -6670, -64, 3654, -7615, -5438, -1851, 1767, -5757, -4486, 6296, 3945, -3597, -5340, 3334, 4852, -2968, -6162, -1043, 4232, -4127, -6420, 1373, 3297, -6991, -5334, -3157, 3885, -7575, -4020, -3300, 3216, -7143, -3695, 2416, 5319, -7734, -4270, 5824, 6929, -8319, -7002, 1604, 7363, -7554, -8663, -425, 6687, -6637, -7166, 5253, 5578, -6455, -6170, 4601, 4738, -6845, -5427, 2271, 5646, -6678, -5236, -3320, 7168, -6552, -5523, 225, 5323, -7351, -5999, -2150, 5953, -8317, -7053, -2347, 7610, -7145, -6934, 4575, 6502, -8156, -6494, -382, 1798, -9853, -5413, -2667, 185, -6083, -3266, 6677, 671, -2786, -3489, 2496, -82, -1897, -4060, -2305, -312, -3881, -4047, 94, -3112, -6789, -2842, -6195, -4387, -6043, -1656, -4527, -3298, -5541, -2090, 1910, -93, -8392, -4763, 2880, 345, -8500, -6439, 1392, 1103, -6982, -7465, -2189, 2263, -5685, -5432, 5724, 3334, -5615, -5057, 3624, 966, -5748, -4048, 2571, 1330, -6184, -4260, -2085, -29, -7237, -5432, 1958, -84, -6780, -5962, -2357, -177, -7591, -7379, -1386, 367, -6957, -7373, 743, 465, -7930, -5907, -1889, 230, -9814, -4485, 1396, 4598, -6465, -3269, 2928, 6111, -3345, -3852, 767, 5020, -866, -3728, -1462, 7667, -3043, -4387, -1885, 7401, -6219, -3898, -5717, 3378, -4874, -2616, -7693, 2469, -4567, -2797, 3494, 4136, -8673, -5515, -87, 5767, -7410, -6263, 342, 2800, -5055, -5733, -343, 2452, -5180, -4679, 4065, 7063, -5258, -5060, -2344, 4917, -5519, -5001, 342, -1695, -5967, -4402, -426, -4011, -6961, -4953, 1798, -2862, -6668, -5565, 609, -969, -7319, -6674, -4484, -703, -7112, -7039, 866, -3058, -7515, -5155, -579, -1834, -10305, -4706, 6395, 3004, -8471, -5001, -2035, 4440, -5920, -5999, 1119, 4157, -2391, -4768, 3105, 5132, -5780, -7126, -5368, 1281, -8027, -6571, -5769, -69, -4227, -3993, -6589, -139, -3162, -2884, 3290, 811, -7971, -5264, -550, 1517, -7276, -5706, -2339, 1435, -4362, -4314, 4385, 1706, -5903, -4168, 3259, 367, -6758, -5671, -4838, -48, -5503, -4948, -1457, 1268, -3888, -4897, 1725, 4657, -4636, -5567, -4983, 1878, -4821, -5113, 1660, -3247, -6028, -5650, -1975, -103, -6356, -5919, -309, 1398, -6864, -5005, -231, 668, -9375, -4904, 6483, -4236, -8706, -4328, -2081, -1643, -7211, -5465, 4137, 2553, -4059, -5404, 1247, 2206, -7152, -7798, -7016, -1953, -8302, -7088, -3833, -3717, -4139, -3913, -93, -1017, -3699, -3859, -50, -1137, -6927, -5273, 2117, 172, -6464, -5654, -3517, 1657, -4909, -4421, 5091, 936, -7339, -5244, -417, -2471, -7004, -5436, -4738, -5426, -4088, -4008, 3778, -1286, -3308, -3979, 5915, 1129, -4507, -5314, -5560, 3247, -4184, -5027, -3088, 2837, -2568, -3283, 1717, 4851, -3766, -3957, -2660, 6102, -6461, -4960, -1598, 4938, -8938, -5221, 6713, -1824, -7005, -2593, -259, -1719, -6893, -3495, 5830, -225, -6860, -5702, -735, -853, -8909, -7802, -7044, -1553, -7478, -6418, 1217, 710, -3745, -4295, 7344, 5832, -5422, -6325, -4428, 3891, -6806, -7186, -765, -2135, -5743, -6017, -3512, -1487, -5157, -4874, 4822, -487, -6832, -5965, -2165, -1655, -6804, -5444, -4412, -82, -3454, -3957, 5153, -152, -5105, -3847, 4206, -364, -5319, -5063, -3854, -1536, -5601, -5385, -377, 1198, -5314, -5155, 1380, 2832, -6723, -5664, 626, 6732, -9658, -7547, -5608, 7175, -9715, -7421, 7097, -95, -6851, -2848, -576, 633, -7494, -4579, 2594, -679, -7289, -5485, -1429, -3730, -7466, -5605, -4503, -1327, -5366, -4503, 4443, 2031, -3163, -4226, 7451, -761, -6067, -6861, -420, 492, -7991, -7725, -4031, 5804, -5767, -4988, -2277, -603, -5861, -4627, 2322, -18, -5702, -4883, -49, -153, -5727, -4948, -3686, 2454, -5377, -5578, 4215, 3444, -6056, -4678, 5879, 8811, -5887, -4438, -5872, 8223, -6464, -5086, 3107, 6919, -7040, -6703, -3576, 9606, -7106, -6964, -938, 2141, -10143, -8034, -2926, 1606, -11184, -7703, 6529, -3769, -7637, -3731, 3733, -654, -8003, -6112, -1735, 837, -7113, -6052, 2057, 2312, -6974, -6342, -4628, 1842, -4943, -5163, 3558, 336, -4001, -5292, 4854, -1463, -4590, -5413, 8897, 267, -7870, -7312, -3922, -616, -9442, -7509, -9145, -389, -6065, -5131, -180, -3429, -5873, -5335, 811, -3541, -5902, -4772, 76, -1667, -5776, -5737, 4013, -1203, -6704, -5820, 6496, -1766, -7568, -6006, -6547, -200, -7891, -6966, 7784, 4011, -7308, -7885, -2013, 7525, -8394, -9111, -10109, 6613, -8477, -6919, -3426, 1959, -10427, -6516, 4756, -222, -7841, -4384, 1877, -4937, -8314, -7297, -2210, -4663, -6258, -6703, 4168, -2717, -6773, -7287, -1481, -898, -6197, -7100, 1759, 473, -4888, -6435, 2836, -386, -5822, -6377, 5601, -5171, -7621, -7346, -2436, -6477, -8024, -6796, -8172, -3922, -5164, -4901, 271, -3260, -3980, -3299, 2571, 1090, -5799, -3215, 5581, 3945, -4710, -4726, 285, 3882, -5132, -4887, 3602, -3203, -5365, -5004, -4442, -7013, -6863, -5902, 9854, -5015, -6656, -7121, -707, -4424, -8303, -9272, -11162, -4862, -9318, -7365, -3165, -443, -10448, -5868, 5024, 5349, -7834, -4087, -2863, 6510, -6484, -5088, 1016, 1740, -5209, -5584, 170, -400, -5750, -5882, -1001, -3962, -5699, -6155, 831, -4290, -4552, -6346, 2171, -3020, -4609, -6600, 2750, -5239, -4614, -6188, 131, -4864, -5064, -6130, -4758, -2220, -4439, -5896, 5032, 6321, -2928, -4244, -672, 4899, -5518, -4169, 5638, -2729, -5691, -4678, -845, -1637, -4927, -4560, 3396, 1673, -4322, -5441, -7482, 1252, -5047, -5295, 2931, -4474, -5073, -5445, -1576, -8205, -5052, -5097, -3046, -2777, -6621, -5228, -1425, 1539, -9426, -5602, 7985, 1360, -8758, -5556, -3655, 2526, -8353, -6424, 1787, 6292, -5483, -6099, -6024, 5828, -4963, -5279, -3424, 1595, -3880, -4251, -318, -602, -2472, -5005, 1714, 467, -3679, -6608, 1276, -153, -3638, -6913, 1171, 723, -2316, -6235, 1505, 2778, -2627, -5875, 5803, 587, -4132, -5997, -3736, 1422, -6346, -5939, -1004, -3406, -4592, -4073, -132, -7985, -3520, -3267, 2529, -7833, -3814, -5135, -5833, -5572, -5445, -5738, -61, -2304, -3305, -4913, -2285, -2320, -2389, -4015, 3590, 2608, -4726, -4772, -1581, 3396, -8172, -5296, 7870, -7195, -8551, -5042, 179, -6100, -8647, -6217, 2916, -1532, -7319, -7614, -7525, -395, -6167, -6182, -4494, -30, -2881, -4264, -2575, 334, -869, -5740, 2448, -2881, -3319, -6735, 3035, 1421, -4316, -7344, -580, -1806, -4080, -5559, 1670, -2162, -5336, -6113, 2775, -5695, -5064, -5597, -4073, -7657, -5420, -4898, 188, -122, -3289, -4214, -946, 37, -2748, -4011, 469, -2888, -3858, -5305, -3476, -3621, -4563, -6607, 2763, -2889, -3025, -6121, 2482, -7, -1461, -5763, 3254, 4901, -4657, -5672, -4718, 4221, -8253, -5244, 3940, -2787, -7125, -4026, 4729, -5306, -6413, -3732, 4534, -7696, -6483, -4609, -4605, -7774, -5658, -4045, 507, -4045, -3116, -4241, -1497, -2504, -1743, -5922, 3591, -2322, -3699, -5874, 5137, 3466, -5277, -5605, -6854, 4105, -4146, -3138, -1294, -3881, -5156, -3638, -3945, -7280, -4618, -3608, 3057, -6426, -4237, -2959, 3569, -3354, -3934, -4327, -3646, -1936, -3128, -4942, -1674, -2905, -3201, -5484, -886, -4443, -4138, -6631, 3369, -6089, -3496, -6163, 5118, -5041, -3319, -5961, 1610, -4172, -6570, -6185, -4940, -1424, -8309, -5038, 1093, -439, -4906, -3203, 3196, -1274, -4241, -2765, 2498, -4194, -4336, -2720, -818, -4731, -4447, -3369, 1972, -3068, -3599, -4096, 1256, -2514, -3300, -5101, 4419, -3143, -4465, -4363, 2691, -5729, -6339, -3835, -4918, -6658, -6896, -3229, -6387, -4653, -5101, -2310, -1364, -2883, -4055, -2719, 1090, -3543, -4170, -2876, 2925, -6165, -4025, -3409, -4946, -5319, -3814, -3736, -238, -2100, -4065, -4531, 1118, -1671, -4268, -5364, 3450, -2641, -4195, -5116, 1886, -3904, -4322, -4397, 1064, -2201, -6064, -3806, -1658, 926, -6974, -3600};
#endif

// Comparator function for sorting floats.
int compare_floats(const void *a, const void *b) {
  const float *da = (const float *) a;
  const float *db = (const float *) b;

  return (*da > *db) - (*da < *db);
}

// Function for computing the deviation from the expected floating point
// result and returning the largest such deviation found.

float compute_error(const Q15_T* const pred, const float* const label,
                    float* const errors, SCALE_T scl) {
  float agg_diff = 0.0;

  for (unsigned i = 0; i < OUTPUT_SIZE; i++) {
    float f_pred = ((float)pred[i]) / pow(2, scl);
    float single_diff = fabs(f_pred - label[i]);
    agg_diff = single_diff > agg_diff ? single_diff : agg_diff;
    errors[i] = single_diff;
  }

  return agg_diff;
}

// Function for computing the 95th percentile deviation among all the outputs.
float aggregate_error(float* errors, unsigned len) {
  qsort(errors, len, sizeof(float), compare_floats);
  unsigned index = (unsigned) round(fmax((0.95 * len - 1), 0));
  return errors[index];
}

/**
 *  By default, all tests run without using bit-shifting operations.
 */
int main(int argc, char **argv) {
  unsigned patches;
  SCALE_T XScale = -1, YScale = 12;
  FILE *xFile, *yFile, *floatResFile, *outputLog;

  if (argc != 6) {
    printf("Improper Number of Arguments Provided!\n");
    fprintf(stderr, "Usage: %s <num_patches> <input_file.npy> <output_file.npy> <expected_output_file.npy> <log_file.txt>\n\n", argv[0]);
    fprintf(stderr, "<num_images> : Number of images in the input file. The entire model is run individually on each image.\n");
    fprintf(stderr, "<input_file.npy> : File containing the images in a numpy array of dimension (num_images, input_channels * input_width * input_height).\n");
    fprintf(stderr, "<output_file.npy> : File to write the generated output in a numpy array of dimension (num_images, confidence + location box outputs).\n");
    fprintf(stderr, "<expected_output_file.npy> : File containing the expected output in a numpy array of dimension (num_images, confidence + location box outputs).\n");
    fprintf(stderr, "<log_file.txt> : File to write the error metrics and the results from the runtime analysis of the model.\n");
    return -1;
  } else {
    patches = atoi(argv[1]);
    xFile = fopen(argv[2], "rb");
    yFile = fopen(argv[3], "wb");
    floatResFile = fopen(argv[4], "rb");
    outputLog = fopen(argv[5], "w");
  }

  if (xFile == NULL) {
    fprintf(stderr, "An error occured while opening the input file.\n");
    return -1;
  }
  if (yFile == NULL) {
    fprintf(stderr, "An error occured while opening the predicted output file.\n");
    return -1;
  }
  if (floatResFile == NULL) {
    fprintf(stderr, "An error occured while opening the expected output file.\n");
    return -1;
  }
  if (outputLog == NULL) {
    fprintf(stderr, "An error occured while opening the output log file.\n");
    return -1;
  }

  char line[9];
  fgets(line, 9, xFile);
  fgets(line, 9, floatResFile);

  int16_t headerSize;
  fread(&headerSize, sizeof(int16_t), 1, xFile);
  char* headerLine = malloc((headerSize + 1) * sizeof(*headerLine));
  fgets(headerLine, headerSize + 1, xFile);

  int16_t floatHeaderSize;
  fread(&floatHeaderSize, sizeof(int16_t), 1, floatResFile);
  char* floatHeaderLine = malloc((floatHeaderSize + 1) * sizeof(*floatHeaderLine));
  fgets(floatHeaderLine, floatHeaderSize + 1, floatResFile);
  free(floatHeaderLine);
  free(headerLine);

  char numpyHeader1[] = "{'descr': '<f4', 'fortran_order': False, 'shape': (";
  unsigned len = snprintf(NULL, 0, "%d", patches);
  char* numpyHeader2 = malloc((len + 1) * sizeof(char));
  snprintf(numpyHeader2, len + 1, "%d", patches);
  char numpyHeader3[] = ", 1, 5400), }";

  size_t headerLength = strlen(numpyHeader1) + strlen(numpyHeader2) +
                        strlen(numpyHeader3);
  int count = 1;
  for (size_t i = headerLength + 10; i % 64 != 63; i++) {
    count++;
  }

  char numpyHeader4[count + 1];
  numpyHeader4[count] = '\0';
  numpyHeader4[count - 1] = (char)(10);
  for (int i = count - 2; i >= 0; i--) {
    numpyHeader4[i] = ' ';
  }

  headerLength += strlen(numpyHeader4);
  char a = headerLength / 256 , b = headerLength % 256;

  char numpyMagix = 147;
  char numpyVersionMajor = 1, numpyVersionMinor = 0;

  fputc(numpyMagix, yFile);
  fputs("NUMPY", yFile);
  fputc(numpyVersionMajor, yFile);
  fputc(numpyVersionMinor, yFile);
  fputc(b, yFile);
  fputc(a, yFile);
  fputs(numpyHeader1, yFile);
  fputs(numpyHeader2, yFile);
  fputs(numpyHeader3, yFile);
  fputs(numpyHeader4, yFile);

  char* mem_buf = malloc(MEM_BUF_SIZE * sizeof(char));
  float* xLine = malloc(INPUT_IMG_HEIGHT * INPUT_IMG_WIDTH * sizeof(float));
  float* yLine = malloc(OUTPUT_SIZE * sizeof(float));
  float* allErrors = malloc(patches * OUTPUT_SIZE * (sizeof(float)));

  float time_spent = 0.0;
  Q7_T* mem_buf_input_offset = (Q7_T *)mem_buf;
  Q15_T* mem_buf_output_offset = (Q15_T *)(mem_buf + 2 * OUTPUT_SIZE);
  for (unsigned i = 0; i < patches; i++) {
    fread(&yLine[0], sizeof(float), OUTPUT_SIZE, floatResFile);
    fread(&xLine[0], sizeof(float), INPUT_IMG_HEIGHT * INPUT_IMG_WIDTH, xFile);

    for (unsigned j = 0; j < INPUT_IMG_HEIGHT * INPUT_IMG_WIDTH; j++) {
      mem_buf_input_offset[j] = (Q7_T)(xLine[j] * pow(2, XScale));
    }

    fprintf(outputLog, "Running Quantized Face Detection Model on Patch %d\n", i + 1);
    clock_t begin = clock();
    q_face_detection_fast(mem_buf);
    clock_t end = clock();
    time_spent += (float)(end - begin) / CLOCKS_PER_SEC;
    fprintf(outputLog, "Time elapsed is %f seconds\n", time_spent);

    float max_diff = compute_error(mem_buf_output_offset, yLine,
                                   allErrors + i * OUTPUT_SIZE, YScale);
    fprintf(outputLog, "Maximum Observed Deviation: %f \n", max_diff);

    for (unsigned j = 0; j < OUTPUT_SIZE; j++) {
      float val = ((float)mem_buf_output_offset[j]) / pow(2, YScale);
      fwrite((char*)&val, sizeof(float), 1, yFile);
    }

    if (i == 0) {
      fprintf(outputLog, "Checking Fixed Point Outputs on Patch 1\n");
      for (unsigned j = 0; j < OUTPUT_SIZE; j++){
        if (mem_buf_output_offset[j] != expected[j]) {
          fprintf(outputLog, "Output: %d, Expected: %d at Index: %d\n",
                  mem_buf_output_offset[j], expected[j], j);
          fprintf(outputLog, "Quantized Face Detection Fixed Point Test Failed!\n");
        }
      }

      fprintf(outputLog, "Quantized Face Detection Fixed Point Test Passed!\n");
    }
  }

  fclose(xFile);
  fclose(yFile);
  fclose(floatResFile);

  float aggregate = aggregate_error(allErrors, patches * OUTPUT_SIZE);
  fprintf(outputLog, "Aggregated 95th Percentile Error: %f\n", aggregate);
  if (aggregate < 0.8922) {
    fprintf(outputLog, "Quantized Face Detection Numerical Test Passed!\n");
  } else {
    fprintf(outputLog, "Quantized Face Detection Numerical Test Failed!\n");
    return -1;
  }

  free(mem_buf);
  free(xLine);
  free(yLine);
  free(allErrors);

  return 0;
}
